please tell me the query to get details of the employee
having the second largest salary

Answer Posted / sushil

select min(a.standardcost) from
(
select distinct top 2 StandardCost
from Production.ProductCostHistory
order by standardcost desc
)a

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Data table as parameter in sql server?

572


How to connect to SQL Azure Database by using sqlcmd?

110


How to include date and time values in sql statements?

636


What is the difference between Clustered and Non-Clustered Index?

612


Explain differentiate between a having clause and a where clause?

523






What is difference between drop truncate and delete?

562


What is an expensive query?

542


What are trace flags and mention a few common trace flags used with sql server?

557


How is table type constraint applied to a table?

554


What is the importance of a recovery model?

616


What command is used to rename the database?

533


How to get nth highest salary from employee table.

623


How to get the definition of a view out of the sql server?

509


What is a synonym for manipulation?

556


How to encrypt data between dialogs?

578