表Table 有AA BB CC
其中AA 为主键且自动增加, 如果用 Insert自动插入批量数据 ,如何写
------解决方案--------------------
- SQL code
DROP SEQUENCE seq_1;CREATE SEQUENCE seq_1 ;CREATE TABLE t(n INT,m INT);INSERT INTO t SELECT seq_1.nextval ,object_id FROM user_objects s WHERE ROWNUM<21;SELECT *FROM t;输出:N M1 1656772 1656783 1656794 1656805 1656816 1656827 1656838 1656849 16568510 16568611 16568712 16568813 16568914 16569015 16569116 16569217 16569318 16569419 16569520 165696