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 / pavithra
select * from emp where rowid in(select rowid from emp
where rownum<=&upto minus select rowid from emp where
rownum<&start)
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is cursor and its types?
what is bcp? When does it used? : Sql dba
What is output spooling in sql*plus?
what is column? : Sql dba
What are the different types of constraints?
what is the syntax used for partition in tsql? : Transact sql
explain access control lists. : Sql dba
What does plv msg allows you to do?
How to install oracle sql developer?
What is difference between hql and sql?
How many types of indexes are there in sql?
Can I learn sql in a week?
What is before and after trigger?
what is rollback? : Sql dba
Can we use pl sql in sql server?