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

Give the different types of rollback segments.

997


How to list all tables in your schema?

1007


What is an oracle database table?

975


When do we use group by clause in a sql query?

1007


What is background process in Oracle?

1068


What are advantages of dateset in datastage?

2223


Why does oracle 9i treat an empty string as null?

1005


State and explain the different types of data models?

912


What is execute immediate in oracle?

970


Explain the truncate in oracle?

928


what happened to the global index when I truncate the data in one of the partition?

1989


What are the predefined tablespaces in a database?

1034


what is the scenario where you take the database to NoArchivelog mode?

2291


Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?

1058


Explain what are clusters?

1070