Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / sandip

SELECT MAX(SAL) FROM EMPLOYEE WHERE SAL<(SELECT MAX(SAL)
FROM EMPLOYEE);

The correct one is.......

SELECT MAX(SAL) as SAL FROM EMPLOYEE WHERE SAL<(SELECT MAX(SAL)
FROM EMPLOYEE);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In pl/sql, what is bulk binding, and when/how would it help performance?

543


What is the difference between rename and alias?

721


What are variables in pl sql?

578


What are the types of records?

548


Can we join tables without foreign key?

530






What is clustered index in sql?

604


What is sql injection vulnerability?

500


What is character functions?

562


What is dcl in sql?

532


What are the indexing methods?

590


What is a clob in sql?

575


What are different types of sql?

572


what does the t-sql command ident_incr does? : Transact sql

612


What is the syntax to add a record to a table?

583


what is view? : Sql dba

566