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

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

Is This Answer Correct ?    27 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of joins in sql?

1732


what are all different types of collation sensitivity? : Sql dba

964


What is the difference between database trigger and stored procedure?

1056


What are string functions in sql?

1219


What is row_number () in sql?

963


What is pl sql and why it is used for?

1098


How does sql store data?

890


Give the order of sql select?

1118


What is pl sql collection?

945


Mention what is the function that is used to transfer a pl/sql table log to a database table?

969


what does the t-sql command ident_current does? : Transact sql

964


What is the maximum rows in csv?

910


Show the two pl/sql cursor exceptions.

1163


What are the types of join in sql?

1077


What are different types of indexes?

995