select * from ( select * from ( select a.*,rownum rn from page a where object_id >1000 and owner='SYS' order by object_id desc ) where rownum<=20 ) where rn>=20; 现在加个HINT SQL> select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS L…
When trying to sort based on values that do not fit the standard ascending and descending sort logic provide by your database engine you can use the following decode() function to sort based on custom value ordering. By ordering your value list in a…
On ROWNUM and Limiting Results Our technologist explains how ROWNUM works and how to make it work for you. By Tom Kyte September/October 2006 This issue's Ask Tom column is a little different from the typical column. I receive many questions about h…