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

What is the difference between sql and isql*plus?

1163


How much does sql cost?

1069


How do you define a foreign key?

1067


Why we use pl sql?

1009


What are the different schemas objects that can be created using pl/sql?

1087


what happens if null values are involved in expressions? : Sql dba

1093


In what condition is it good to disable a trigger?

1075


What are system versioned tables?

1076


Can we rename a column in the output of sql query?

1046


How many types of functions are there in sql?

1009


How do I create a sql script?

1144


What is AUTH_ID and AUTH_USER in pl/sql ?

2237


What is difference between pls_integer and integer?

1011


Show the cursor attributes of pl/sql.

1106


Why do we use cursors?

1047