一种嵌套查询,变成连接查询的办法

主 题:这句sql语句可不可以变成连接查询的呢?
作 者:overmind (overmind)
等 级:
信 誉 值:100
所属社区:Oracle 开发
问题点数:100
回复次数:6
发表时间:2004-12-14 10:31:43
select t1.oid from t1 where t1.oid not in (select oid from t2 where t2.userid='overmind');

回复人: ** overmind(overmind) ** ( 一级\(初级\) ) 信誉:1002004-12-14 10:32:07得分: 0
谢谢了先!

回复人: ** ORARichard(没钱的日子好难过啊) ** ( 五级\(中级\) ) 信誉:1002004-12-14 10:38:00得分: 100
select t1.oid from t1,(select oid from t2 where t2.userid='overmind') t3 where t1.oid <> t3.oid

** Top **

回复人: ** ORARichard(没钱的日子好难过啊) ** ( 五级\(中级\) ) 信誉:1002004-12-14 10:40:49得分: 0
还可以 select t1.oid from t1, ( select oid from t1 minus select oid from t2 where userid='overmind' ) t3 where t1.oid=t3.oid;

** Top **

Published At
Categories with 数据库类
comments powered by Disqus