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
what is data manipulation language? : Sql dba
What do you understand by exception handling in pl/sql?
Enlist the advantages of sql.
What is dynamic sql in pl sql?
What is the difference between inner join and left join?
what is the difference between group by and order by in sql? : Sql dba
what is bcp? When is it used?
What is sql and explain its components?
Can we call procedure in select statement?
What is exception? What are the types of exceptions?
How can a function retun more than one value in oracle with proper example?
what are all different types of collation sensitivity? : Sql dba
What is sqlcommand?
what is a database lock ? : Sql dba
What are the different types of a subquery?