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
What is union?
What does pl sql stand for?
Can sql developer connect to db2?
Can you do multiple joins in sql?
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
Explain cursor types?
How does left join work in sql?
What operators deal with null?
What is the main reason behind using an index?
What does sign mean sql?
Define union, minus, union all, intersect ?
What are the different operators available in sql?
How to return an array from java to pl/sql?
What is sql performance tuning?
Does mysql_real_escape_string prevent sql injection?