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

Explain character-manipulation functions?

1066


how to drop an existing index in mysql? : Sql dba

1016


What is sql*plus?

1016


Explian rowid, rownum?

955


What are the basic techniques of indexing?

1012


Is sql an operating system?

959


First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.

1535


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

947


How do you update a table in sql?

921


Explain how can you save or place your msg in a table?

979


How to write pl sql program in mysql command prompt?

1006


what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba

969


How do you modify a column in sql?

937


What is the execution plan in sql?

970


Is sql considered coding?

991