How do you retrieve the last N records from a table?

Answer Posted / sunil bisht

Last 10 record from emp table

select * from emp where rowid<=(select max(rowid) from emp)
minus select * from emp where rowid in(select rowid from
emp where rownum<=3);

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is program debugging?

572


What does varchar include?

519


How to assign sql query results to pl sql variables?

515


What is the difference between left outer join and left join?

518


What is sql partition function?

620






Can I call a procedure inside a function?

556


Does view store data in sql?

539


Is postgresql a nosql database?

537


What are % type and % rowtype?

578


What is a sql trace file?

550


How many databases can sql express handle?

536


what is a stored procedure? : Sql dba

559


Explain architecture of sql server notification services?

622


Is sql better than excel?

519


What are different types of indexes?

512