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

SELECT *
FROM (SELECT emp.*, ROWNUM rn
FROM emp)
WHERE rn = 1 OR rn = (SELECT COUNT (*)
FROM emp);

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I connect to oracle?

1025


How to do clean up if create database failed?

1017


How to change program global area (pga) in oracle?

1079


How to pass a parameter to a cursor in oracle?

1164


How do I start tns listener?

1036


What is Data Dictionary Cache in Oracle?

1158


How to compare dates in oracle sql?

1092


What is the usage of merge statement?

1140


How to use like conditions in oracle?

1033


How to empty your oracle recycle bin?

1017


What is private procedure oracle?

1006


Why do you create or replace procedures rather that drop and recreate.

997


How to resolve name conflicts between variables and columns?

1015


What is a dead lock in oracle?

1109


How to insert multiple rows with one insert statement in oracle?

1072