您的位置:首页 > 其它

要求从表A查数据插入到表B中,并且要求如果表A中已存在的数据,就不要重复插入

2014-01-08 09:41 253 查看
insert into A select * from B where not exists (select 1 from A where A.ID=B.ID)

insert when (not exists (select 1 from 表名 where 检验重复的条件)) then into 表名 values(相应的值)select 1 from dual
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐