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
How does an execution block start and end in pl sql?
Is there a way to automate sql execution from the command-line, batch job or shell script?
How do I create an index in word?
What is pl sql and why it is used for?
What is bitemporal narrowing?
What is the difference between a subquery and a join?
What is the file extension for sql database?
Is progress software supports to ( pl/sql )?
What is cold data?
What is full join in sql?
What are sql triggers used for?
How does one use sql*loader to load images, sound clips and documents? : aql loader
Why are aggregate functions called so?
What is difference between inner join and self join?
Why procedure is used in sql?