Oracle中sql语句循环插入

来源:互联网 发布:js自动答题代码 编辑:程序博客网 时间:2024/06/02 00:27
DECLARE
       i number:=0;
BEGIN
    for i in 1..100 loop
    insert into EMP (ID, NAME, PASSWORD, AGE)values (SEQ_ID.NEXTVAL, 'test', '54321', 22);
    commit;
           dbms_output.put_line(i);
       end loop;
END;
0 0