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);

I don't think this will work correct me if i am
wrong.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

Which software is used for pl sql programming?

526


What is character functions?

558


Explain the the update statement in sql?

576


What is the use of desc in sql?

496


Why is partition used in sql?

552






Can we use joins in subquery?

539


what is the difference between clustered and non clustered index in sql? : Sql dba

553


Can I learn sql in a week?

554


Can we insert data into materialized view?

519


What is the advantage of nosql?

530


What is pl sql block in dbms?

532


How do you write a subquery?

525


What is package in pl sql?

579


State some properties of relational databases?

586


Explain the commit statement.

613