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 / nitinmukhraiya

Rownum and RowID displays the results faster than others -

select * from <Table_Name> where rownum=1
union
select * from (select * from <Table_Name> order by rownum desc) where rownum=1

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we join same table in sql?

1066


What is meant by <> in sql?

1026


How do I run a query in pl sql developer?

1049


What is difference between stored function and application function?

1289


What is substitution variable?

1096


Explain what is sql*plus?

1196


What is trigger types in sql?

1043


What are different clauses used in sql?

1172


What are the types pl/sql code blocks?

1195


Which constraints we can use while creating database in sql?

1120


which operator is used in query for pattern matching? : Sql dba

1045


What do you mean by field in sql?

1125


What are the two types of exceptions.

1218


What are the types of records?

1035


How many types of sql are there?

1045