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

Answer Posted / swastik

 select
 * from
 (
 select  e1.*
 from emp e1
 order by rownum desc
 )
 where rownum <= &n

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you modify a table in sql?

571


discuss about myisam index statistics collection. : Sql dba

531


What is self-join and what is the requirement of self-join?

637


what are sequences

1099


what is a tablespace? : Sql dba

564






How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?

598


How can the performance of a trigger be improved?

592


Why trigger is used in sql?

535


Does group by remove duplicates?

553


What is an intersect?

657


What is the maximum number of triggers, you can apply on a single table?

544


Explain spool.

691


What is the difference between inner join and left join?

550


What is the command used to fetch first 5 characters of the string?

887


is it possible to pass an object or table to a procedure as an argument?

576