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 is commit? : Sql dba

1078


What is full form of rtm?

1008


Explain the order of sql statement execution?

1046


How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?

1107


Is ms sql traffic encrypted?

925


Why do we use joins in sql?

970


What is the difference between inner join and outer join?

997


What are the different type of joins in sql?

956


what is 'mysqladmin' in mysql? : Sql dba

1026


what are wild cards used in database for pattern matching ? : Sql dba

1144


What is the difference between microsoft access and sql server?

1060


Is left join inner or outer by default?

1020


Is inner join same as self join?

1117


How do I run pl sql in sql developer?

1120


what are the different type of sql's statements ? : Sql dba

926