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 / ravi singh

select * from table_name
where rownum = 1
union
select * from table_name
where rownum > (select (count(1) - 1) from table_name);

I think this should work. try

Is This Answer Correct ?    3 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How much does sqlite cost?

986


Is it possible to update views?

919


What is on delete restrict?

945


What is the need of a partition key?

942


what are set operators in sql? : Sql dba

985


Why do we use joins in sql?

911


What is a column in a table?

1065


What is sequence in sql?

945


What is clause?

1067


what tools available for managing mysql server? : Sql dba

1012


What is difference between sql and excel?

1010


Explain correlated query work?

992


What is meant by cursor in sql?

943


Why we use join in sql?

917


Which column of the user triggers data dictionary view displays the database event that will fire the trigger?

972