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

What view means?

558


What is mutating sql table?

613


Why we use join in sql?

533


Is sql difficult?

748


Can sql developer connect to db2?

587






i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5

3214


How do you write an index?

529


how can we destroy the cookie? : Sql dba

561


What is raid? How does it help storage of databases?

605


Explain clause in sql?

564


What is trigger with example?

569


what is a composite primary key ? : Sql dba

583


Explain mutating table error.

649


What is input buffer in sql*plus?

648


what is the stuff function and how does it differ from the replace function? : Sql dba

624