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...

how to retrieve 1st and last row of table without using
group functions??

Answer Posted / prabhudatta

SELECT * FROM (SELECT * FROM EMP ORDER BY EMP_NO) WHERE
ROWNUM=1

UNION

SELECT * FROM (SELECT * FROM EMP ORDER BY EMP_NO DESC)
WHERE ROWNUM=1;

Is This Answer Correct ?    14 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an index associated with a constraint?

1026


How to upsert (update or insert into a table)?

993


What are the various oracle database objects?

1136


How data locks are respected in oracle?

1058


What are the built-in functions used for sending Parameters to forms ?

3372


What is an oracle cursor variable?

1059


What is the purpose of save points in oracle database?

1094


How to rename an index?

1059


Does oracle charge for java?

1051


What is open database communication (odbc) in oracle?

996


What are the different types of partitions in oracle?

962


How to experiment a data lock in oracle?

1048


Difference between inner join vs where ?

1027


How to use existing values in update statements using oracle?

1055


How to start your 10g xe server?

1028