要根据字段c排序后取第21—30条记录显示

更新时间:01-24 教程 由 花栀 分享

要根据字段c排序后取第21—30条记录显示?

1.select * from (select c.*,rownum as rn from (select * from t order by c desc) c) where rn between 21 and 30;

2.select * from (select * from test order by c desc) x where rownum < 30

minus

select * from (select * from test order by c desc) y where rownum < 20 order by 3 desc

二者相比,下边的Minus性能稍差。

声明:关于《要根据字段c排序后取第21—30条记录显示》以上内容仅供参考,若您的权利被侵害,请联系13825271@qq.com
本文网址:http://www.25820.com/tutorial/14_2183103.html