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

How do I trace a query in sql server?

933


What is data source document?

1015


How to set the current database in ms sql server?

1057


What is a dbms wizard?

1001


What are two difference between sql azure and azure tables?

159


Difference between uniqe index and uniqe constraint?

950


mention different types of relationships in the dbms?

1002


What are the general features of sql server management studio? : sql server management studio

1060


What is the use of for clause?

1090


Explain various data region available in ssrs with their use?

910


What is the difference between count and distinct count?

872


Explain what is lock escalation and what is its purpose?

918


What is a hint?

973


What is triggers and its types?

995


How do I view views in sql server?

987