A表和B表,表结构一致,如何把B表中和A表不相同的数据插入A表,这是我的面试题,请大家帮忙想一想。
解决方案 »
- 求人解答conn sys/password@sid as sysdba与conn sys/password as sysdba连接的区别?谢谢
- oracle如何能够快速的读取大量数据
- ora-01113 and ora-01110
- 游标速度都很慢吗
- 求SQL:MsSQL 转 Oracle 的
- oracle基础使用
- 请教有那些好用的oracle数据库管理工具
- Unable to load DLL (oci.dll). 问题!急,在线等待!
- oracle字典使用
- oracle 传统分页数据取出来后卡住的问题
- 比较难搞的sql语句(寻求好的解决方案)
- 一个简单的select语句编写,在线等待,解决马上给分...
select id,name,addr from a
minus
select id,name,addr from b;(语法忘记了 )大致就是这样也可以用外连接
select id,name,addr from b where not exists(select id from a where a.id=b.id)
select id,name,addr from b where not exists(select id from a where a.id=b.id)
正解。
取得相同的把not exist改为exist即可
select id,name,addr from b
minus
select id,name,addr from a;
select * from A,B where a.id(+)=b.id where a.id is null