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
What are trace flags?
What is the main purpose of having conversation group?
What are the different types of backups avaialabe in sql server 2005?
What is 2nf in normalization?
What is the use of keyword with encryption. Create a store procedure with encryption?
What are various aggregate functions that are available?
What are the differences between union, intersect, and minus operators?
What is the data type of time?
What is 5nf in normalization form?
What is the difference between Triggers and Stored Procedure?
How each E-R model constructs can be mapped to the relational model?
What is the difference between ‘having’ clause and a ‘where’ clause?
What the difference between UNION and UNIONALL?
Write a sql query to get zero records from a table having n number of records?
Explain what is “asynchronous” communication in sql server service broker?