主题:求一SQL语句!!(急)
xtarwgd
[专家分:0] 发布于 2007-04-09 17:29:00
如果我用一条SQL语句找出了表TABLE1中N条记录(不管这SQL语句是什么),请问怎么选取没有被这条语句所查询到的记录??
回复列表 (共3个回复)
沙发
AS_Roma [专家分:10] 发布于 2007-04-09 21:21:00
select * from table 1
where not exists(select *from table 2
where condition and table1.what=table2.what)
不知道有没有用。很久没碰数据库了。嘿嘿
板凳
yaojp7519 [专家分:600] 发布于 2007-04-10 09:32:00
select * from table1 a
where a.id not in (select top 10 id from table1 b where ....)
3 楼
zlyyi [专家分:0] 发布于 2007-04-12 16:24:00
select top n from table 1 where
我来回复