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 is it different from a normal table?

986


How to speed up webrick?

1028


What is the implicit cursor in oracle?

1054


Explain constraining triggers.

1055


Explain drop constraint oracle?

1005


How do I limit the number of oracle database connections generated by weblogic server?

1020


How to select some columns from a table in oracle?

1024


What is the difference between PFILE and SPFILE in Oracle?

1005


How to use regular expression in pattern match conditions in oracle?

987


What happens if variable names collide with table/column names?

1127


What is the difference between translate and replace?

1025


Why oracle is used?

1016


What is the difference between postgresql and oracle?

997


Explain what are the advantages of views?

1026


What are the common oracle dba tasks?

1091