How to read 2nd highest sal from EMP table?

Answer Posted / b.kumar

-- USING MS SQL SERVER

SELECT TOP 1 FROM

( SELECT DISTINCT TOP 2 FROM EMP ORDER BY SAL DESC) EMP
ORDER BY SAL ASC

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you manage sql azure security?

99


What is tablesample?

766


What are the different editions available in sql server 2000?

763


What is query processing?

692


What is the largest component inside a field?

748






How do you check sql server is up and running?

691


What is named calculation? : sql server analysis services, ssas

730


what is the different types of backups available in sql server? : Sql server database administration

645


What is the status of services on passive node for failover cluster in sql server? : sql server database administration

840


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

674


How can we solve concurrency problems?

779


What is explicit mode in sql server?

740


What is normalization and its types?

750


Explain the concept of view and Types of views in SQL server?

774


Which are new data types introduced in sql server 2008?

809