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 / mohammed shahid
select distinct TOP3 from emp order by rownum desc;
| Is This Answer Correct ? | 2 Yes | 8 No |
Post New Answer View All Answers
why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba
When do we use triggers?
how can we take a backup of a mysql table and how can we restore it. ? : Sql dba
What is an exception in pl/sql?
write an sql query to find names of employee start with 'a'? : Sql dba
How do you drop a trigger?
Can we insert in sql function?
What is sql architecture?
How many joins in sql?
What is pl sql package?
What is basic structure of pl sql?
Why do we need cursor in pl sql?
Can we alter stored procedure?
What are different joins used in sql?
What are the three forms of normalization?