Find out last 4 rows inserted rows ?

Retrieve data from emp table

Emp table

find out the last last 4 rows inserted

The query

select * from (select * from emp order by rowid desc) 
where rownum<=4;

Leave a Reply