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
What is sql analyzer?
Can we join same table in sql?
Explain what is table in a database?
What is the use of procedures?
Explain the difference between sql and mysql.
What are tables in sql?
what is the difference between group by and order by in sql? : Sql dba
Can we use rowid as primary key?
how to get a list of indexes of an existing table? : Sql dba
Can a varchar be a primary key?
Can we enter data in a table in design view?
What is trigger in pl sql?
what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
Which nosql database is best?
what is innodb? : Sql dba