Powered By Blogger

Sunday 22 April 2012

First and Last Row of the TABLE


First row of table 
SQL>select * from EMP where rownum = 1 order by rowid desc;
Last Row of table
SQL>select * from EMP where rowid IN (select max (rowid) from EMP);
SQL>select  * from (select * from emp order by rowid desc) where rownum = 1;

No comments: