To find second largest salary in Employee table

Answer Posted / saravanakumar

SELECT MAX(SALARY) FROM EMPLOYEE WHERE SALARY NOT IN
(SELECT MAX(SALARY) FROM EMPLOYEE)

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you drop an index?

500


What does top operator do?

565


Is it possible to have clustered index on separate drive from original table location?

513


Do you know query execution plan?

586


What are the advantages of the mirroring?

564






How much is a sql server license?

506


What is replace and stuff function in sql server?

561


What type of locking occurs during the snapshot generation? : sql server replication

862


What is coalesce and check constraint in sql server?

539


hi, the following are the outputs of sp_spaceused and sp_tempdbspace sp_spaceused ------------ database size unallocated size tempdb 77752.95 MB 28026.99 MB sp_tempdbspace ------------- database size spaceused tempdb 77752.945312 1.007812 the unused space in sp_spaceused is nearly 28 Gb and in sp_tempdbspace is nearly 76 Gb cany any one explain about this output and why its giving different results.

2468


How to find out what is the default collation in a database?

621


What is plan freezing?

582


What are types of subqueries?

555


How do I find query history in sql server?

514


what are the different stages of Report Processing?

97