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 / ramesh

Select * from table_name where rowid =(select min(rowid)
from tanle_name)
union
select * from table_name where rowid = (select max(rowid0
from table_name);

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why stored procedure is faster than query?

1062


How you can copy a file to file content and file to pl/sql table in advance pl/sql?

1148


Differentiate between % rowtype and type record.

1305


how to rename an existing column in a table? : Sql dba

1020


Should I use mbr or gpt?

1026


Can I call a procedure inside a function?

1012


When to use inner join and left join?

959


is mysql query is case sensitive? : Sql dba

1103


what is recursive stored procedure? : Sql dba

987


What is synchronized subquery?

1170


What is sql prepared statement?

987


define sql update statement ? : Sql dba

1123


What is delimiter in pl sql?

1062


What is difference between cursor and trigger?

1079


What is before trigger?

1004