how to find the second highest salary from emp table?

Answer Posted / radha sri seshu

second method is
select sal from emp e1 where 2=(select count(distinct(sal))
from emp e2 where e1.sal<=e2.sal);

Is This Answer Correct ?    35 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a left inner join?

530


What is constant in pl sql?

513


How can you fetch common records from two tables?

585


What is function and procedure?

561


What is rank () in sql?

528






What is mutating sql table?

602


What is insert command in sql?

522


How many types of tables are there?

497


Which version of sql do I have?

555


how to get a list of columns in an existing table? : Sql dba

536


How to get list of all tables from a database?

623


What is database sql?

537


Is mariadb a nosql database?

532


What is dynamic sql in pl sql?

487


discuss about myisam index statistics collection. : Sql dba

522