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 / arvind kumar
select * from employees minus select * from employees where
rownum < (select count(*)-2 from employees);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to run pl/sql statements in sql*plus?
What is set serveroutput on in pl sql?
What is the difference between left join and right join?
what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba
What is a file delimiter?
list out some tools through which we can draw e-r diagrams for mysql. : Sql dba
how many values can the set function of mysql take? : Sql dba
What is primary key and foreign key with example?
How would you convert date into julian date format?
Can I create table without primary key?
What are the three pl sql block types?
How do I delete a trigger?
how to shutdown mysql server? : Sql dba
What is sql comments?
What are primary key and foreign key and how they work?