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

Can we connect to ORACLE db using Windows Authentication?

713


How to write numeric literals in oracle?

601


What is dual table oracle?

518


What are the restrictions in a oracle read only transaction?

559


How to define a specific record type?

609






Can you have more than one content canvas view attached with a window ?

1815


What is oracle open database communication (odbc)?

553


How to use existing values in update statements using oracle?

540


Difference between oracle's plus (+) notation and ansi join notation?

567


You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?

1441


How to rebuild an index in oracle?

543


What language does oracle use?

590


What is the usage of merge statement?

663


How to define an oracle cursor variable?

558


How to convert numbers to characters in oracle?

582