How do you retrieve the last N records from a table?
Answer Posted / nani
select * from emp a where &N > (select count(*) from emp b
where b.rowid > a.rowid)
N = No.of rows.
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
what are the types of join and explain each? : Sql dba
What is the difference between a query and a report?
what is top in tsql? : Transact sql
Mention what problem one might face while writing log information to a data-base table in pl/sql?
what is a cursor? : Sql dba
How does sql store data?
how can we know the count/number of elements of an array? : Sql dba
How you can copy a file to file content and file to pl/sql table in advance pl/sql?
What are the query optimization techniques?
what is the stuff function and how does it differ from the replace function? : Sql dba
what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
How to avoid using cursors?
Can we insert data into materialized view?
what is try_catch block in procedure
How do I create a memory optimized filegroup?