閱讀392 返回首頁    go 阿裏雲 go 技術社區[雲棲]


要求從表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

  上一篇:go 排序算法測試程序入口
  下一篇:go 虛機能ping通主機但主機ping不通虛機