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 / gnreddy
try this one.
select * from emp where 3 >( select count(1) from emp e where e.rowid > emp.rowid);
Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
How is debugging done?
How we can update the view?
Is full outer join same as cross join?
What is left join example?
Why is nosql good?
What is rank dense_rank and partition in sql?
How many types of indexes are there in sql?
What is linq to sql?
How does cross join work?
What is the difference between partition and index?
What is a database trigger?
What is the use of function "module procedure" in pl/sql?
How do you sort in sql?
Why is stored procedure faster than query?
what is collation? : Sql dba