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 / rajesh venati

this will also work

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

Is This Answer Correct ?    23 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to run sql functions in pl/sql?

1041


Can one improve the performance of sql*loader? : aql loader

1026


explain advantages of myisam over innodb? : Sql dba

1054


What is cursor in pl sql with examples?

1011


Can we use ddl statements in stored procedure sql server?

989


What is a dynamic query?

1008


What are sql indexes?

978


how to use myisamchk to check or repair myisam tables? : Sql dba

956


what are wild cards used in database for pattern matching ? : Sql dba

1125


What is delimiter in pl sql?

1038


Why truncate is used in sql?

984


What is a function in oracle pl sql?

1014


how to enter numeric values as hex numbers? : Sql dba

1046


Which normal form is best?

937


What is difference between hql and native sql?

1145