I have 15 records in a table and I want to fetch the last record from a table ?
This below query does not return any output for me … Am I doing anything wrong !!!
My query :
select * from employee where rownum=(select max(rownum) from employee);
One more thing I observed is that when I write this query it gives me first record as an output
select * from employee where rownum=1;
But when I write like this below it gives me nothing as an output ? why is it so ? It should give me second record ?
select * from employee where rownum=2;