select top 3 * from Students where id not in(select top 3 id from Students order by ID) order by ID
在网上已有很多,都是关于分页存储过程中,你可以Find,Find
--不包括where 条件是不可能地! --为什么不要包含条件 --try select * from Students where id not in (select top 3 id from Students) --看楼下地!
Select top 3 from (Select top 6 from students order by Id desc)聲明:未測試
--不包括where select * into # from Students order by ID set rowcount 3 delete from # select * from # order by ID set rowcount 0
select top 3 * from Students where id not in(select top 3 id from Students order by ID) order by ID
--是个好办法,不过你有点问题.我给你改改,不过你取数据的时候还是用到where 了撒! select * into # from Students where id not in (select top 3 id from Students)set rowcount 3 delete from # select * from # order by ID set rowcount 0
--为什么不要包含条件
--try
select * from Students
where id not in (select top 3 id from Students)
--看楼下地!
select * into # from Students order by ID
set rowcount 3
delete from #
select * from # order by ID
set rowcount 0
select * into # from Students
where id not in (select top 3 id from Students)set rowcount 3
delete from #
select * from # order by ID
set rowcount 0