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

What is a file delimiter?

1166


Lookups are a key component in sql server integration services (ssis). Explain its purpose?

1058


How do you remove duplicates without using distinct in sql?

1019


what are the 'mysql' command line options? : Sql dba

1137


What is the maximum database size for sql express?

1076


What is gpt format?

993


What are different types of functions in sql?

1055


what is a field in a database ? : Sql dba

1099


What is difference between sql and excel?

1185


What is pl sql variable?

1036


What is before trigger?

1052


What is not in sql?

1001


Do ddl statements need commit?

1025


What is pl sql collection?

1017


How can the performance of a trigger be improved?

1090