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 / alok narayan
select * from (select * from emp order by rowid desc )
where rownum <= 3 order by rowid;
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is sql select statement?
What is normalisation and its types?
What is meant by truncate in sql?
Is left join faster than join?
Can you join a table to itself?
What is sql exception?
What is varchar sql?
What are different types of sql commands?
Is not equal in sql?
How many aggregate functions are available there in sql?
why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba
What is compute?
What is a database? Explain
Is time a data type in sql?
Is id a reserved word in sql?