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 / gnreddy
try this one.
select * from emp where 3 >( select count(1) from emp e where e.rowid > emp.rowid);
Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
What is the difference between an inner join and an outer join?
What is data manipulation language?
How do you use collections in procedure to return the resultset?
Which sql statement is used to return only different values?
What is a nested table in word?
what is 'mysqldump'? : Sql dba
What are the packages in pl sql?
Explain the components of sql?
how to create a new view in mysql? : Sql dba
How do I restart sql?
What is rename in sql?
How many types of functions are there in sql?
How do you update a table in sql?
Which is better stored procedure or query?
What does dml mean?