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 to find nth highest salary

Answer Posted / premsagar12

SELECT DISTINCT(A.SAL),ENAME FROM EMP A WHERE &N=(SELECT
COUNT(DISTINCT(B.SAL )) FROM EMP B WHERE A.SAL<=B.SAL);

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different SQL Server Versions you have worked on?

1006


What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture

1007


What do you understand by mirroring and mention the advantages of the mirroring?

1068


What is raid, and how it can influence database performance?

1058


How to select all columns of all rows from a table with a select statement in ms sql server?

1115


Show Practically Sql Server Views are updatable?

1124


What is sub query and its properties?

974


What is indexing and its types?

1018


What is difference in performance between insert top (n) into table and using top with insert?

1046


How to maintain a fill factor in existing indexes?

1006


What is implicit mode in sql server?

1106


what is the difference between delete table and truncate table commands? : Sql server database administration

1036


How to create an index on an existing table in ms sql server?

981


is there a column to which a default can't be bound? : Sql server database administration

1015


Can select statements be used on views in ms sql server?

1065