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 / alok narayan
select * from (select * from emp order by rowid desc )
where rownum <= 3 order by rowid;
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
How do you update f as m and m as f from the below table testtable?
What is a table?
What is 19 null in sql?
Define sql delete statement.
What is update query?
What are the differences between in and exists clause?
What is the use of function "module procedure" in pl/sql?
Are subqueries faster than joins?
what is the syntax for using sql_variant_property? : Transact sql
What is sql keyword?
What is a sql driver?
Where is pl sql used?
What are some predefined exceptions in pl/sql?
Is sql a programming?
Cite the differences between execution of triggers and stored procedures?