select top 1000 * from (
select top 2000 * from tablename order by col1 asc,...colN asc
)
order by col1 desc,...colN desc
select top 2000 * from tablename order by col1 asc,...colN asc
)
order by col1 desc,...colN desc
解决方案 »
- 如何合并数据
- 急 查询问题
- 咨询sql server2000 datediff函数计算两个时间之间相隔天数问题
- Sql Server 2005 查询问题
- 请问:数据文件为什么分成多个存,文件组又是什么意思?谢!!!!
- 批量或者一次性删除所有表的数据保留数据结构的代码
- 求教关于sql group by的问题
- 一个SQL计算的问题,争求解决方案
- 挑战一流高手!!!给出总金额,自动得到需用圆、角、分币,各需多少?
- 下雨了,大家快来收衣服啊!一个交叉查询的问题
- 请问:能不能在win2000professinal上安装SQL7的database server-standard edition
- suppose两个表都有一个相同的字段,如何对两个甚至多个表进行汇总,如有多个表名字也相近,如table1 ,table2.....,可不可以编程汇总
select * form (select top 1000 * from (
select top 2000 * from tablename order by col1 asc,...colN asc
)
order by col1 desc,...colN desc ) as b order by col1 desc,...colN desc
select top 1000 * from table order by colunm desc
或者
set rowcount 1000
select * from table order by colunm desc
set rowcount 0