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...

i need department wise top 2 employees salary.which logic
i will use

Answer Posted / vikas kapoor

select deptno,sal from
(select deptno,sal,row_number() over(partition by deptno orderby sal) r from emp ) where r<3

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to fix oracle error ora-00942: table or view does not exist

1017


Can we use joins in subquery?

1166


What is count * in sql?

1001


Is sql developer case sensitive?

1004


How to make a copy values from one column to another in sql?

1038


What is Materialized View? In What Scenario we Use Materialized View?

9523


What is oracle sql developer?

1062


How many types of literals are available in pl sql?

1120


Can we use rowid as primary key?

990


Can a composite key be null?

982


Can we use pl sql in sql server?

1086


What is a loop in sql?

989


What is rtm in testing?

1121


What is pessimistic concurrency control? : Transact sql

1093


Can we use having without group by in sql?

986