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 will I find the first 5 highest salaried employees in
each dept in oracle.

Answer Posted / pawan

Select DISTINCT TOP 5 salary from emp_table1
UNION ALL
Select DISTINCT TOP 5 salary from emp_table2

for more details about UNION and UNION ALL check this: http://www.w3schools.com/sql/sql_union.asp

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?

2209


How to load data from external tables to regular tables?

989


Explain constraining triggers.

1045


Explain an index segment?

1043


How to create a testing table in oracle?

948


How many types of database triggers exist?

1068


What is the difference between online and offline backups?

973


What happens to the current transaction if the session is killed?

927


What are the major difference between truncate and delete?

984


What is the Tune Query

2235


How a tablespace is related to data files?

1062


How to write a query with a right outer join in oracle?

1113


Explain the types of exception?

1083


What are the attributes that are found in a cursor?

1013


Explain about functional dependency and its relation with table design?

954