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 / ajit nayak

select *from emp
minus
select *
from emp
where rownum <= (select count(*)-3 from
emp);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java sql drivermanager?

746


Is sql free?

678


what is transaction? : Sql dba

719


what does the t-sql command ident_incr does? : Transact sql

805


Is left join same as join?

729






What is the primary key?

700


What is the use of non clustered index?

714


How to Execute a Package in PL/SQL.?

807


Should I use mbr or gpt?

727


What is the size of partition table?

742


How long it takes to learn pl sql?

724


Explain exception handling in pl/sql?

729


What are inbuilt functions in sql?

794


How can you fetch first 5 characters of the string?

711


What are sql indexes?

740