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 / ajit nayak
select *from emp
minus
select *
from emp
where rownum <= (select count(*)-3 from
emp);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are pl sql procedures?
How consistent is the view of the data between and within multiple sessions, transactions or statements ?
how many groups of data types? : Sql dba
What is bitemporal narrowing?
Is sql developer case sensitive?
Can you have more than one key in a database?
How to rename a column in the output of sql query?
How you can copy a file to file content and file to pl/sql table in advance pl/sql?
List and explain the different types of join clauses supported in ansi-standard sql?
what is row? : Sql dba
What is the difference between jpql and sql?
How do you write a complex sql query?
What is cursor and its types?
how do you tune the slow running queries in oracle db , explain the methodology
What are the 3 modes of parameter?