Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Thanks in advance

Answer Posted / cbigmudre

(select * from table limit 0,1)
union
(select * from table order by Id desc limit 0,1)

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is parallel hint?

1419


how to load data files into tables with 'mysqlimport'? : Sql dba

1148


what are the differences between binary and varbinary? : Sql dba

1085


List the ways to get the count of records in a table?

946


What are different clauses used in sql?

1174


what is heap table? : Sql dba

1143


What is type and rowtype in pl sql?

1060


What are functions in sql?

999


What is normalisation and its types?

1046


What is sql query optimization?

1196


Where can I learn sql for free?

1052


Why is there a need for sqlcode and sqlerrm variables?

1104


How to make a copy values from one column to another in sql?

1084


Explain 3 basic parts of a trigger.

1376


Does user triggers have entry for trigger with compilation errors?

1091