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 / pavithra
select * from emp where rowid in(select rowid from emp
where rownum<=&upto minus select rowid from emp where
rownum<&start)
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What are predefined functions in sql?
How can we implement rollback or commit statement in a trigger?
What is primary key sql?
What are the two characteristics of a primary key?
how to use case expression? : Sql dba
What is scalar function in sql?
Why is stored procedure faster than query?
What is break?
what are the drivers in mysql? : Sql dba
Do triggers have restrictions on the usage of large datatypes, such as long and long raw?
What is normalization in a database?
What is the file extension for sql database?
What does partition by mean in sql?
what is union? : Sql dba
Does view contain data?