先查询后插入

欢迎大家访问我的个人网站 萌萌的IT人,后续所有的文章都会在此发布

--------------------------------------------------------------------------------------------  

insert into INF_REL_OPE (
     select '10000' oper_id,t.* ,0.00 FEE_VALUE,1 IS_ALLOW,0 OPER_OPER_ID,sysdate oper_time from  (select privilege_id from INF_PR where PRIVILEGE_NAME like 'BILLING%' order by privilege_id) t
     union all
     select '10001' oper_id,t.* ,0.00 FEE_VALUE,1 IS_ALLOW,0 OPER_OPER_ID,sysdate oper_time from  (select privilege_id from INF_PR where PRIVILEGE_NAME like 'BILLING%' order by privilege_id) t
     )

 

你可能感兴趣的:(查询)