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 / ajit nayak
select *from emp
minus
select *
from emp
where rownum <= (select count(*)-3 from
emp);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can we create a trigger on view?
what's the difference between a primary key and a unique key? : Sql dba
Are sql connections encrypted?
What is full join in sql?
What is the use of non clustered index?
How many types of cursors supported in pl/sql?
How can I delete duplicate rows?
what is sub-query? : Transact sql
what is a view? : 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
How do I tune a sql query?
What is pl sql script?
What is an exception in PL/SQL? What are the two types of exceptions?
What is pls_integer in pl sql?
What is the difference between cross join and natural join?