How to retrieve first and last records from a table?

Answer Posted / avnish srivastava-test engg fc

select* from employees where rowid=(select min(rowid) from
employees)
union
select* from employees where rowid=(select max(rowid) from
employees)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ASM (Automatic Storage Management) in Oracle?

703


What would you do with an in-doubt distributed transaction?

1463


State the difference between a primary key and foreign key?

506


Explain the use of owner option in exp command.

561


Why do you create or replace procedures rather that drop and recreate.

537






What is oracle sid?

504


What is a tns service name?

526


How do I use unicode codesets with the weblogic jdriver for oracle driver?

542


Explain the difference between replace() and translate() functions in oracle?

568


What is the difference between primary key and unique key and foreign key in oracle?

542


How to experiment a data lock in oracle?

590


How to get execution statistics reports on query statements?

563


IS it possible to built the oracle database without setting the kernal parameters?

1756


What is set verify off in oracle?

566


Can we create database in oracle using command line ?

575