【Oracle】根据查询的结果批量插入新数据

话不多说,给个例子:

insert into user_role (IS_USERRIGHT, USER_ID, ROLE_ID, RULE_ID)
select 1, g.id, 111, 0
from gu g where g.start_date like to_date('2020-01-03','yyyy-mm-dd') and g.code not in ('T111');
发布了18 篇原创文章 · 获赞 11 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qaz5209103/article/details/103817841