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
How are functions and procedures called in PL/SQL?
Is foreign key mandatory?
How do I copy a table in sql?
How do you update a table in sql?
What is the difference between sql and mysql?
What is the use of index in sql?
Is sql a dbms?
Which function is used to return remainder in a division operator in sql?
What is varchar data type in sql?
Explain the uses of control file.
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
how do you login to mysql using unix shell? : Sql dba
What is a scalar value in sql?
What is database migration?
What are basic techniques of indexing?