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 do I remove sql plus from windows 10?
What is difference between hql and sql?
What is trigger with example?
What is difference between joins and union?
How many databases can sql express handle?
Compare sql & pl/sql
What are the different type of joins in sql?
what is a constraint? : Sql dba
What are the two different parts of the pl/sql packages?
What is the difference between microsoft access and sql?
What is pl sql in oracle?
What are the built in functions of sql?
Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql
What is oracle sql called?
What is a primary key example?