How do you retrieve the last N records from a table?

Answer Posted / rajat

SELECT * FROM EMP A
WHERE ROWID NOT IN
(SELECT ROWID FROM RAJ WHERE ROWNUM<=(SELECT COUNT(1) FROM RAJ )-10);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can the performance of a trigger be improved?

592


how to present a past time in hours, minutes and seconds? : Sql dba

568


Is primary key an index?

537


How do I add a database to sql?

584


Where not exists in sql?

503






What is dbo in sql?

536


What is Materialized View? In What Scenario we Use Materialized View?

8536


Is full outer join same as cross join?

505


What is pl sql package?

600


Does truncate release storage space?

562


What is pl sql record in oracle?

567


What can sql server reporting services do?

586


What are three advantages to using sql?

555


What is trigger in pl sql?

562


Which function is used to return remainder in a division operator in sql?

585