To find second largest salary in Employee table
Answer Posted / zulfikar ali
SELECT MAX(SALARY)
FROM EMPLOYEE
WHERE SALARY NOT IN(SELECT TOP 1 SALARY FROM EMPLOYEE ORDER
BY SALARY DESC)
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are 3 ways to get a count of the number of records in a table?
How to automatically create a log when an exception is being received into SQL Server?
How to Sync Two SQL Azure Databases?
What are different types of collation sensitivity?
Explain the dbcc pintable command when would you use it?
What are the new scripting capabilities of ssms? : sql server management studio
Tell me about the approaches which you used to counter the DI problems.
Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?
Explain the different types of joins?
what is raid and what are different types of raid configurations? : Sql server database administration
List few advantages of stored procedure.
How do I find my localdb version?
Suppose i have a table that contains 5 columns like col1,col2...colm5.I want to import only two column through BCP utility.How to do same through BCP in sybase.
What is xdr?
What is use of attribute hierarchy ordered ? : sql server analysis services, ssas