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

Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.

2162


How to commit the current transaction in oracle?

1127


What is the difference between truncate & delete command?

1188


Explain database link?

1131


How would you go about verifying the network name that the local_listener is currently using?

2049


How to drop a stored procedure in oracle?

1056


Explain an extent?

1109


What is system tablespace?

1102


Explain the characteristics of oracle dba?

1120


What privilege is needed for a user to query tables in another schema?

974


6. Display the client name and order date for all orders using the traditional method.

2313


What is open database communication (odbc) in oracle?

1003


What do you understand by a database object? Can you list a few of them?

1020


What is an oracle and why it is used?

1154


How to start a new transaction in oracle?

1088