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

What are data pump export and import modes?

1110


How to get a list of all user accounts in the database?

1129


In what script is snap$ created? In what script is the scott/tiger schema created?

2759


When system tablespace is created?

1090


What is the data type of dual table?

1064


How can Oracle users be audited?

1170


Is rowid unique in oracle?

1044


What is sequence?

1136


Describe varray?

1116


How do we display rows from the table without duplicates?

1016


How to list all tables in your schema?

1116


Is there a function to split a string in plsql?

1109


What is a tns file?

1042


How to select some columns from a table in oracle?

1170


Explain joins in oracle?

1090