How to retrieve first and last records from a table?

Answer Posted / abc

SELECT * from empl WHERE ROWID IN (
SELECT MAX(ROWID) FROM empl
UNION
SELECT MIN(ROWID) FROM empl
);

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 difference between primary key and unique key and foreign key in oracle?

544


What are the different oracle database objects?

584


What is an oracle user role?

569


What is the difference between a user and a schema in oracle?

556


How many categories of data types in oracle?

603






How to view the data files in the current database?

592


What is the maximum limit on the number of columns in a table?

549


How do I spool in oracle?

539


How to use subqueries in the from clause in oracle?

579


What is the relation of a user account and a schema in oracle?

583


Explain the use of record option in exp command.

531


Is postgres faster than oracle?

557


Explain oracle left join with an example?

581


Where is the export dump file located?

567


We are using Oracle apps with XML publisher.In that,we are facing some problems while giving a Footer in RTF Template.While giving a footer in RTF Template it is Visible in all the pages,but after the PDF is getiing generated,the Footer are Visible on alternate pages only (like on first page ,third page) and so on. Please provide the Solution for getting the Footer on all the pages.

4930