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

Following are some of the question related to below
mentioned query?

select e1.salary from employee3 e1
where 2=
(
select count(distinct(e2.salary))
from employee3 e2 where e2.salary>=e1.salary
)

1) What the query returns?

2) How it works? - Detail explanation (what the sub query
does, why it is (where 2=)....etc...Please?

Answer Posted / ashok

Hi

1.Here query will return 2nd highest salary
2.here 2= i.e 2nd heigest similary if we set N in place
of 2 then it will returen Nth heigest salary
where n =1,2,3,4.....

Hope it will help u

Ashok

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is nolock?

983


What is normalization and denormalization in sql server?

1017


How to view existing indexes on an given table using sys.indexes?

1091


How to drop existing views from a database in ms sql server?

1103


How to create stored procedures with parameters in ms sql server?

1079


How to perform backup for certificates in sql server? : sql server security

1092


can any body tell me how to know the password of current user in sql server

2072


How to disable stored procedure sql server?

1606


Which Model uses the SET concept

984


What is enhanced database mirroring in sql server 2008?

971


How to assign null values to variables or columns?

977


How to download and install microsoft .net framework version 2.0?

1139


What can be used instead of trigger?

1156


What is filestream?

1001


What is data modification?

977