假設b中另外一個不會為null的欄位name
那麽SQL:
select a.* from a,b
where a.id=b.id(+)
and b.name is null
那麽SQL:
select a.* from a,b
where a.id=b.id(+)
and b.name is null
解决方案 »
- 求pl/sql快速写包的方法、工具或思路
- 菜鸟请教,对oracle一点都不懂啊
- oracle 定期删除数据并归档
- PB9.0连接ORACLE9.0的问题?
- 求助:sqlplus 远程连接 ora-12514错误
- 十万火急,有一怪SQL脚本,不知道如何执行?
- 小弟不才,关于 "ORA-01017 invalid username/password;logon denied" 高手请指点一下,
- 关于ORACL的查询问题
- 紧急求教如何做?我有备份如何导入.
- 我定义了一个存储过程get_ccm(gcbh varchar2),编译能过。但在PL/SQL中执行时出
- 请问spool命令是起什么作用,请帮忙,谢谢
- 请问如何把“用PowerDesigner建好的数据模型结构”导入到oracle92中?请高手指教!
where a.id not in (select b.id from b)
where a.id not in (select b.id from b)
这个是能选出来不同的,但是一条记录显示了多次
比如a中id字段有值1,2,3;b中id字段有值2,3
那么就输出a中id=1的纪录。
(select id from b)
執行效率比not in效率高
執行效率比not in效率高不好意思,你说的我不太明白,欄位是什么啊?
where a.id not in (select b.id from b)
这个是能选出来不同的,但是一条记录显示了多次
不明白,不可能出现重复记录,除非你表a中,本身就有重复记录