1.通过存储过程方式 CREATE OR REPLACE procedure XXZY.p_test is i number; begin .. loop INSERT INTO test_job VALUES(i,'张三'||to_char(i)); end LOOP; EXCEPTION WHEN OTHERS THEN DBMS_output.PUT_LINE(SQLERRM); end p_test; /
#xiaodeng#python3#基于SQL和PYTHON的数据库数据查询语句import pymysql #1.基本用法cur.execute("select * from biao") #2.查询某表中的特定数据,如某制定id和名字的数据cur.execute("select * from biao where id="XXXX" and name="xxx" ") #3.统计函数select count(1) from