sql 获取第10到20个记录

select top 10 [time] ,currentprice from (select top 20 [time], currentprice from sh601398 where StockID='601939' order by [time] desc)bb   order by [time] asc

 

select TOP 10 * from (select top 20 * from table order by XXX asc)
order by XXX desc
先取前20
再倒序取前10
如果要照10--20排序請再排序一次


posted @ 2009-05-29 17:22  邓维  阅读(1530)  评论(0编辑  收藏  举报