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

What is the least restrictive isolation level? : Transact sql

763


Is pl sql a programming language?

716


What is difference between inner join and self join?

776


Does mysql_real_escape_string prevent sql injection?

689


Can we use ddl statements in stored procedure?

880






Mention what is the plv (pl/vision) package offers?

839


Does oracle roll back the transaction on an error?

743


What is the difference between python and sql?

704


What is constant in pl sql?

706


What is sql partition?

750


Can you select everything, but 1 or 2 fields, without writer's cramp?

687


What is difference between procedure and trigger?

669


Can I copy :old and :new pseudo-records in/to an oracle stored procedure?

869


Why are indexes and views important to an organization?

679


What does pl sql stand for?

851