兄弟,不要用not in,用not exists
例如......id not in (select id form othertable)
变为
select * from dddd a where not exists (select id from otertable b where b.id=a.id)
例如......id not in (select id form othertable)
变为
select * from dddd a where not exists (select id from otertable b where b.id=a.id)
解决方案 »
- pl/sql语句询问
- oracle数据插入
- 请教一条看似简单的sql语句
- 请教一个存储过程问题
- 请问这段备份数据表的PL/SQL代码该如何写?谢谢!
- 请教一个函数怎么写。谢谢
- 有一本书,是wrox的《Oracle 8i 应用程序高级编程——Java,PL/SQL和XML深入分析》,大家觉得怎么样
- 怎么用Oracle Spatial建立数据库呢?刚把Oracle8i装上,不知道从那个程序进去,怎么动手?
- 再求SQL语句(2003/07/25) ,很急。
- 请教高手:实现一个从3300万记录中汇总排序查询,需把sort_area_size设置为多大合适?能否超过shared_pool_size?这有什么规定?(急!!
- 高手,用sql语句如何找出表中某字段相同的前5条记录
- 一个SQL语句的转换问题,求教(sybase>oracle)
his_hi_instore a,t_buyer b,HIS_HI_COMPARING c
where a.USE_FLAG=0 and c.DEl_FLAG=0
and c.BUYER_ID=a.BUYER_ID
and c.HIS_PRODUCT_ID=a.HIS_YPID
and a.buyer_id=b.org_id
你的语句跟我给的语句执行结果不一样的