当前位置: 代码迷 >> Oracle管理 >> 两个结构相同的表中数据开展比较
  详细解决方案

两个结构相同的表中数据开展比较

热度:66   发布时间:2016-04-24 04:19:29.0
两个结构相同的表中数据进行比较
oracle的数据库中,有两个结构完全相同的表A、B,表A数据多,表B数据少,如何进行比较操作,并将A多出的数据放入另一个表C中?急,请各位大哥多指点!!!
------解决方案--------------------
insert into c
select * from a
minus select * from b;

or

insert into c 
select * from a
where not exists(select 1 from b where ..=a... and ..=a... and ....)
  相关解决方案