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 the command used to fetch first 5 characters of the string? : Sql dba
How many joins can you have in sql?
Could you please provide oca (oracle 10g) dumps for my certification ?
What is error ora-12154: tns:could not resolve the connect identifier specified?
What are the datatypes available in pl/sql ?
What is java sql drivermanager?
how tsql statements can be written and submitted to the database engine? : Transact sql
What is the difference between row level and statement level trigger?
How many tables can a sql database have?
what are the advantages of mysql in comparison to oracle? : Sql dba
What is structural independence and why is it important?
What is a dirty read sql?
Does view contain data?
What are the various restrictions imposed on view in terms of dml?
Why plvtab is considered as the easiest way to access the pl/sql table?