How to read 2nd highest sal from EMP table?

Answer Posted / sheshu4040

SELECT MAX(EMP_SALARY) FROM EMP
WHERE EMP_SALARY NOT IN (SELECT MAX(EMP_SALARY) FROM EMP)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to check if stored procedure is running in sql server?

648


How do I start sql server 2017?

703


Why should you use or avoid select * statements?

735


How to find the version of sql server? : sql server database administration

811


what's new in sql server 2016?

729






Can primary key be null?

683


What is it unwise to create wide clustered index keys?

750


What is a sql join?

750


What is difference between stored procedure and user defined function?

732


Tell me the use of keyword with encryption. Create a store procedure with encryption?

754


how we use window authentication connection with sql server.?

813


Explain can SSRS reports Cache results?

136


What is table valued function and scalar valued functions?

708


What is the difference between deallocate cursor and close cursor?

916


How to create a trigger for insert only?

764