-
偽列rownum盹兢,不能用于排序和分組形耗,除非套一層select
select col01,col02 from table1 where rownum = 1;
select col02, col02 from (select col01, col02 from table1 order by col02 ) where rownum = 1;
-
row_number() over(),必須套一層select
select * from (
select col01,col02,
row_number() over(partition by col03 order by col05 DESC) as num2
from table1 t1
) t2
where t2.num2=1;
參考資料:E11882_01/server.112/e41084/functions156.htm#i86310
-
fetch first 版本12c才支持
select col01, col02
from table1
order by col03
fetch first 1 rows only;
-
offset fetch next 版本12c才支持
select col02, col02
from table1
order by col03
offset 1 rows fetch next 1 rows only;