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

Answer Posted / naresh

select sal from emp e where 2= (select count(distntsal) from
emp y where e.sal<=y.sal);

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are all the ddl commands?

638


how can we destroy the session, how can we unset the variable of a session? : Sql dba

554


how do you know if your mysql server is alive? : Sql dba

604


What is use of trigger?

515


What is mdb stand for?

560






Do ddl statements need commit?

540


What is informix sql?

540


Describe sql comments?

565


What is the difference between cross join and natural join?

570


What is identity column in sql server?

539


What is implicit cursor in pl sql?

544


What is a loop in sql?

572


what are the security recommendations while using mysql? : Sql dba

581


What are tables and fields in the database?

556


Define commit, rollback and savepoint?

582