oracle 从一张表查询的数据批量插入另一张表,其中另一张表主键使用序列

话不多说,直接上代码:

INSERT INTO SYS_MANGERSETTING
(DBID, ORGID, BUSINESSTYPE, ISTRUST, ISPTY, ISFILING, EFFECTFLAG, CREATEUSER, CREATEDATE, LSTMNTUSER, LSTMNTDATE, FIELD1, FIELD2, FIELD3, FIELD4, FIELD5) 
SELECT s_sys_mangersetting.nextval,m.ORGID,'IBD',m.ISTRUST,m.ISPTY,m.ISFILING,m.EFFECTFLAG,m.CREATEUSER,m.CREATEDATE,m.LSTMNTUSER,m.LSTMNTDATE,m.FIELD1,m.FIELD2,m.FIELD3,m.FIELD4,m.FIELD5 FROM SYS_MANGERSETTING m  WHERE m.BUSINESSTYPE ='SEC' AND m.ORGID ='1602099999';

你可能感兴趣的:(笔记,oracle,数据库)