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
Mention what pl/sql package consists of?
Why schema is used in sql?
How does postgresql compare to oracle/db2/ms sql server/informix?
What are the differences between implicit and explicit cursors?
How many types of sql are there?
Is sql a backend?
Explain what is sql*plus?
Explain locks? : Transact sql
What is the use of nvl function?
what are the advantages and disadvantages of cascading style sheets? : Sql dba
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me
what are the system privileges that are required by a schema owner (user) to create a trigger on a table?
What are the advantages of pl sql over sql?
What is the use of partition by in sql?
Is pl sql and postgresql same?