from the table display the 2nd highest salary?
and also the least 2nd salay?

Answer Posted / soorai ganesh

SELECT 'Second Highest Salary Is ', MAX(Salary) FROM Employee WHere Salary < ( Select MAX(Salary) FROM Employee )

SELECT 'Second Least Salary Is ',MIN(Salary) FROM Employee WHere Salary > ( Select MIN(Salary) FROM Employee )

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain differences between web edition and business edition?

103


What are different types of table joins?

555


Write a SQL queries on Self Join and Inner Join.

615


How to read data in a table with "select" statements?

554


Describe different Processing Modes offered by SSRS?

164






What are the basic functions for master, msdb, model, tempdb databases?

588


What does REVERT do in SQL Server 2005?

558


How do I create a trace in sql server?

512


How to create prepared statements using odbc_prepare()?

565


Which joins are sql server default?

506


How to rename databases in ms sql server?

620


How can you know if the row fetched from cursor is still valid in underlying table?

513


How you can get a list of all the table constraints in a database?

511


You have a table ‘test’ which is a copy of northwind employee table you have written a trigger to update the field ‘hiredate’ with the current date

600


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