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

Can we use update in sql function?

571


What company owns postgresql?

554


What are the benefits of pl/sql packages?

539


how can we destroy the cookie? : Sql dba

550


How do you determine the current isolation level? : Transact sql

571






Why do you partition data?

528


How many types of triggers are there in pl sql?

570


What are the types of join in sql?

513


What is the primary use of normalization?

520


How to Declare Fixed Length String Value In PL SQL

657


What are variables in pl sql?

554


What are the advantages of sql?

556


Why do we use sql constraints?

652


How do you take the union of two tables in sql?

511


Why primary key is required?

545