Write a query to find second highest salary of an employee.

Answer Posted / satheesh

SELECT MAX(SAL) FROM EMP A
WHERE SAL NOT IN(SELECT MAX(SAL) FROM EMP B);

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 display the current date in sql?

601


Explain two easy sql optimizations.

604


How to test for null values?

606


define sql insert statement ? : Sql dba

552


What is aggregate function in sql?

539






How to load data with sql*loader?

552


Is mariadb a nosql database?

542


how can you create an empty table from an existing table? : Sql dba

661


Write a query to display the current date in sql?

516


What is join view in sql?

515


What is an implicit commit?

559


What are the indexing methods?

577


How do you get column names only for a table (sql server)?

671


Can you have a foreign key without a primary key?

510


What is the difference between numeric and autonumber?

501