影子博客

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
  45 随笔 :: 0 文章 :: 1 评论 :: 35055 阅读

insert into tableA
select * from tableB b where not exists(select 1 from tableA a where a.id = b.id)

insert into tableA
select * from tableB b
left join tableA a on a.id = b.id
where a.id is null

posted on   影子博客  阅读(413)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示