how to retrieve last tree records from table?
select *from emp where rownum > (select count(*)-3 from
emp);
i am using this query to get last three records from table
but its not giving any output, so please tell me what is the
error in this query.

Answer Posted / arvind kumar

select * from employees minus select * from employees where
rownum < (select count(*)-2 from employees);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does an execution block start and end in pl sql?

497


Is there a way to automate sql execution from the command-line, batch job or shell script?

555


How do I create an index in word?

540


What is pl sql and why it is used for?

570


What is bitemporal narrowing?

722






What is the difference between a subquery and a join?

527


What is the file extension for sql database?

515


Is progress software supports to ( pl/sql )?

526


What is cold data?

501


What is full join in sql?

518


What are sql triggers used for?

509


How does one use sql*loader to load images, sound clips and documents? : aql loader

668


Why are aggregate functions called so?

510


What is difference between inner join and self join?

588


Why procedure is used in sql?

531