您的位置:首页 > 数据库

sql 获取第10到20个记录

2009-05-29 17:22 176 查看
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排序請再排序一次
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: