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 / bikash khuntia
select * from (
select rownum rw,bk.sal from
(select sal from TEMP_SAL order by rowid desc) bk) bik
where bik.rw<=3
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which type of cursor is used to execute the dml statement?
Define the select into statement.
Explain the savepoint statement.
what is the difference between $message and $$message? : Sql dba
What is the function that is used to transfer a pl/sql table log to a database table?
how are mysql timestamps seen to a user? : Sql dba
What are inner outer left and right joins in sql?
What is hibernate and its relation to sql?
What are pl/sql cursor exceptions?
Can a commit statement be executed as part of a trigger?
Where is pl sql used?
Can we use views in stored procedure?
How long it takes to learn pl sql?
What are triggers in sql?
I need a function for a train ticket reservation please answer it thanks in advance