Write a query to get last 10 records from the table.

Answer Posted / jprakash025

select * from emp
minus
select * from emp
where
rownum<=(select count(*)-10 from emp);

or



SQL> select * from
2 (select rownum a, emp.* from emp)
3 where
4 a>(select max(rownum)-10 from emp);

Is This Answer Correct ?    24 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we call dml statement in function?

535


What is partition by in sql?

567


What is Collation Sensitivity ? What are the various type ?

495


What are reports usually used for?

559


When you have to use a default "rollback to" savepoint of plvlog?

715






list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

507


how would you enter characters as hex numbers? : Sql dba

511


How does one load ebcdic data? : aql loader

641


how to use in conditions? : Sql dba

508


How to change the order of columns in Oracle SQL Plus ?

610


what are numeric data types? : Sql dba

569


differentiate between float and double. : Sql dba

553


What is a relationship and what are they?

576


Does truncate need commit?

509


How many developers work on postgresql?

559