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 schema is used in sql?
What is the difference between count 1 and count (*) in a sql query?
What information is needed to connect sql*plus an oracle server?
what is sp_pkeys? : Transact sql
How does sql developer connect to oracle database?
What is an emotional trigger?
what are all the different normalizations? : Sql dba
What does sign mean sql?
Show the cursor attributes of pl/sql.
how to enter characters as hex numbers? : Sql dba
What does cursor do in sql?
How do I add a database to sql?
What are all the ddl commands?
how to run 'mysql' commands from a batch file? : Sql dba
What is sql indexing?