Hi Everyone,
How to get fist and last record from a table in oracle?

Thanks in advance

Answer Posted / ramesh

Select * from table_name where rowid =(select min(rowid)
from tanle_name)
union
select * from table_name where rowid = (select max(rowid0
from table_name);

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is varchar example?

572


How do you modify a table in sql?

559


What is group function in sql?

531


what is a control file ? : Sql dba

575


What is sql dialect?

527






What is function and procedure in pl sql?

515


what is isam? : Sql dba

572


Define overloaded procedure?

620


What are the various levels of constraints?

659


What is difference between stored function and application function?

592


What is before trigger?

549


What are the different types of constraints?

561


How many sectors are in a partition?

557


Are there any features that are decommissioned in 11g that are not present in 11g?

1591


What is secondary key?

508