写入数据
BEGIN FOR I IN 1 .. 10 LOOP INSERT INTO ss VALUES ("I","I","I"); COMMIT; sys.DBMS_LOCK.sleep (5); END LOOP; END; /
说明:在写入过程中,有主键冲突,则在最后会提示。但非主键冲突的数据已经写入到表中。
更新数据
BEGIN FOR I IN 1 .. 10 LOOP UPDATE ss SET C2= 'AAAA1+' || I WHERE C1 BETWEEN 0 AND 100; COMMIT; sys.DBMS_LOCK.sleep (5); END LOOP; END; /
删除数据
BEGIN FOR I IN 1 .. 10 LOOP DELETE FROM ss WHERE C1 BETWEEN I AND I; COMMIT; sys.DBMS_LOCK.sleep (5); END LOOP; END; /