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 database migration?
Explain architecture of sql server notification services?
What are the two types of exceptions in pl/sql?
What normalization means?
What is a sql schema used for?
Explain the difference between triggers and constraints?
Why truncate is used in sql?
Can we insert data in view?
How much does sql cost?
What are procedures used for?
What is cross join example?
what is the difference between undefined value and null value? : Sql dba
Can I create table without primary key?
What is sql deadlock?
Which join is default?