Oracle rownum應用於分頁

兩條語句哪個效率高了??
1.   
select * from (   
    select rownum ids, u.* from t_user u) t1
where t1.ids between 10 and 20;

2.
select * from (
    select t1.* from (   
        select rownum ids, u.* from t_user u) t1
    where t1.ids <= 20) t2
where t2.ids>=10;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章