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 / bikash khuntia
select * from (
select rownum rw,bk.sal from
(select sal from TEMP_SAL order by rowid desc) bk) bik
where bik.rw<=3
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to write a query to show the details of a student from students table whose
What is sql resultset?
How does one use sql*loader to load images, sound clips and documents? : aql loader
What is the use of index in sql?
what is foreign key? : Sql dba
How do you determine the current isolation level? : Transact sql
Can we join two tables without common column?
What is the difference between local and global temporary table?
What is on delete restrict?
Differentiate between syntax and runtime errors.
How do I install microsoft sql?
What is the default isolation level in sql server? : Transact sql
What does trigger mean in slang?
What is the difference between left join and right join?
What is the advantage of index in sql?