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

SELECT * FROM (SELECT * FROM EMP ORDER BY EMP_NO) WHERE
ROWNUM < 2

UNION

SELECT * FROM (SELECT * FROM EMP ORDER BY EMP_NO DESC)
WHERE ROWNUM < 2;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

20. Using a set operator, display the client number of all clients who have never placed an order.

2188


Why oracle is used?

1062


What happens to indexes if you drop a table?

1171


What is partitioned table in Oracle?

1191


Difference between pre-select and pre-query

1115


How many types of cluster table in Oracle?

1034


How do I uninstall oracle client from windows?

1012


What are the types of trigger in oracle?

984


Can we store images in oracle database?

1010


definition of cluster and non-clustered index?

3035


How to connect to a remote server?

1128


What is the difference between pre-select and pre-query?

1222


Briefly explain what is literal? Give an example where it can be used?

1045


Explain the use of control file?

1113


How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1934