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

Answer Posted / krishna mohan thamisetty

SELECT * FROM Emp e1
WHERE 2 = (SELECT COUNT(*) FROM Emp e2 WHERE e1.Salary <=
e2.Salary)

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create an identity column?

624


List out the differences between the clustered index and non-clustered index in sql server?

490


do you know what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration

468


Why do we use stored procedures in sql server?

483


Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?

504






What are the different types of replication are there in sql server 2000?

549


Can foreign key be duplicate?

620


How to find the second highest salary of an employee?

574


What are the advantages to use stored procedures?

553


Do you know what are the ways available in sql server to execute sql statements?

536


What is the query and subquery?

606


What are pages and extents? : SQL Server Architecture

545


Explain the benefits of user-defined functions?

511


How do we Backup SQL Azure Data?

82


What are the different types of stored procedures?

536