要求從表A查數據插入到表B中,並且要求如果表A中已存在的數據,就不要重複插入
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
最後更新:2017-04-03 12:54:15
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
最後更新:2017-04-03 12:54:15