表A, a.id 表B,b.id
其中a.id与b.id字段值部分相等.
现求, a.id=b.id 不相等a表中的值(意思a表中字段a.id在B表中字段b.id,中不相等的那些值,(不显示a.id=b.id的所有值,而显示a.id!=b.id的所有值))
求SQL语法!
其中a.id与b.id字段值部分相等.
现求, a.id=b.id 不相等a表中的值(意思a表中字段a.id在B表中字段b.id,中不相等的那些值,(不显示a.id=b.id的所有值,而显示a.id!=b.id的所有值))
求SQL语法!
解决方案 »
- 求教关于Oracle varchar2字段查找效率的问题
- 关于Oracle和MySQL 启动的奇怪问题
- 用Oracle SQL Developer 将MS SQL Server 数据库迁移到 Oracle 11g,“定位源插件”检测失败。
- 急,sql行拼接,实现了马上给分
- 怎样将null转换为0字符?
- 新手问题,请问oracle中的全局数据库有什么用啊?
- 如何获取用户所在计算机的IP地址?高手路过看一看:)
- 如何解决超大大数据容量问题
- 求救一个 Job 的问题,在线等待
- Oracle数据库,电脑重启之后建的表空间什么的都没有了。
- Oracle XE 如何升级3.0
- oracle 10g怎么安装啊
from a
where not exists(select 1
from b
where a.id=b.id)
from a
where a.id not in (select id
from b)
where not exists (select 1 from b where a.id=b.id);select a.* from a where a.id not in(select b.id from b);兩個都行,如果B表中資料較多,用exists.