how to find the second salary?

Answer Posted / rajkumar v

Select min(salary)FROM emp WHERE (salary IN (SELECT TOP 2
salary FROM emp ORDER BY salary DESC))

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a trigger be created on a view?

566


How you can find out if an index is useful to the optimizer?

488


List the ways in which dynamic sql can be executed?

633


What is the stored procedure?

556


what are the disadvantages of cursors? : Sql server database administration

490






What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?

608


What command would you use to create an index?

581


Why we use functions in sql server?

513


Explain security with sql azure?

161


Can you explain different types of joins?

540


What are some of the pros and cons of not dropping the sql server builtinadministrators group? : sql server security

541


You are doing log shipping due to some reasons it is failing. How you will proceed from there

1544


What is the difference between the 2 operating modes of database mirroring?

570


Explain some stored procedure creating best practices or guidelines?

512


Can you explain different types of locks in sql server?

517