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 save transaction and save point?

1119


How will you monitor replication activity and performance? What privilege do you need to use replication monitor? : sql server replication

1013


What is the use of attributehierarchyvisible ? : sql server analysis services, ssas

1011


What is a db view?

853


Will count(column) include columns with null values in its count?

1032


How to provide login information for a new odbc dsn?

979


How to backup encryption key ?

167


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

2022


What is the name of the Database which IBM mainframe uses?

947


What is factless fact table? : sql server analysis services, ssas

962


What is a DBMS, query, SQL?

993


What part does database design plays a role in performance of an sql server-based application?

925


let's assume you have data that resides on sql server 6.5. You have to move it sql server 7.0. How are you going to do it? : Sql server database administration

899


What is indexed view?

926


Explain primary key?

897