27,579
社区成员
发帖
与我相关
我的任务
分享
select
*
from
(select
top 300 *
from
(select top 600 * from T order by [Col001] desc ) T1
order by [Col001] asc)T2
order by [Col001] desc--加多一次排序
create table new(id int,col001 char(20))
go
select * from
(select top 300 * from (select top 300 * from [new] order by [Col001]) aaa
order by [Col001] desc) bbb order by [Col001]
drop table new
select top 300 * from [new] where [Col001] not in (select top 300 [Col001] from [new] order by [Col001]) order by [Col001]
select top 300 * from [new] where [Col001] not in (select top 300 [Col001] from [new] order by [Col001])) order by [Col001])