How do you retrieve the last N records from a table?
Answer Posted / sunil bisht
Last 10 record from emp table
select * from emp where rowid<=(select max(rowid) from emp)
minus select * from emp where rowid in(select rowid from
emp where rownum<=3);
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
explain the delete statements in sql
What is the purpose of the primary key?
Which is better trigger or stored procedure?
Why truncate is faster than delete?
What are secondary keys?
What are the set operators in sql?
How is debugging done?
What is AUTH_ID and AUTH_USER in pl/sql ?
what is an alias command? : Sql dba
Explain the purpose of %type and %rowtype data types with the example?
How do you drop a trigger?
How to sort the rows in sql.
Can we call a function containing dml statements in a select query?
What are the types of sql commands?
What are the different ddl commands in sql?