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 / shekaran04
Hi,
First thing you cannot use " ROWNUM > (somthing) "
And to get last three records...
Select *from emp
minus
Select *from emp where rownum <(select Count(*) from emp)-
3;
Good Luck...
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Why cannot I use bind variables in ddl/scl statements in dynamic sql?
how to create a new view in mysql? : Sql dba
Does sql*plus have a pl/sql engine?
Can we use having without group by in sql?
differentiate between float and double. : Sql dba
What does the hierarchical profiler does?
What is scope and visibility in PL/SQL?
What does pl sql stand for?
What is informix sql?
What are the types of functions in sql?
What sql does db2 use?
What is a temporal table?
How many types of functions are there in sql?
Is clustered index a primary key?
What are two statement types in sql?