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 / mohammed shahid
select distinct TOP3 from emp order by rownum desc;
| Is This Answer Correct ? | 2 Yes | 8 No |
Post New Answer View All Answers
What is a sql schema used for?
what is an extent ? : Sql dba
Is it mandatory for the primary key to be given a value when a new record is inserted?
What are the various restrictions imposed on view in terms of dml?
Is ms sql traffic encrypted?
What is scope of pl sql developer in future?
Can a table have no primary key?
Why truncate is faster than delete?
What are character functions?
What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql
Explain lock escalation? : Transact sql
what is a constraint? Tell me about its various levels. : Sql dba
How to create your own reports in sql developer?
How many types of functions are there in sql?
What is PL/SQL Records?