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 / mohammed shahid
select distinct TOP3 from emp order by rownum desc;
| Is This Answer Correct ? | 2 Yes | 8 No |
Post New Answer View All Answers
What are the two different parts of the pl/sql packages?
what is the difference between delete and truncate statement in sql? : Sql dba
How much does sql cost?
What does joining a thread mean?
What is a crud api?
How subquery works in sql?
What are sql objects?
What are the types of keys?
What is keys and its types?
What is rank function in sql?
Is there a way to automate sql execution from the command-line, batch job or shell script?
What is a join?
How do you use a while loop in pl sql?
What is over () in sql?
What is the difference between the implicit and explicit cursors?