how to find the second highest salary from emp table?

Answer Posted / surendra sharma

select min(sal) from table_name where sal in

(SELECT top 2 sal FROM table_name order by sal desc)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a subquery and a join?

531


what is 'mysqlcheck'? : Sql dba

577


What is case function?

603


What is substitution variable?

587


What are character functions?

633






explain the difference between delete , truncate and drop commands? : Sql dba

553


How do I find sql profiler?

523


Can we use pl sql in sql server?

545


What is t sql used for?

553


What is a sql schema used for?

549


What is primary key and foreign key?

537


what are the types of subquery? : Sql dba

594


what is a composite key ? : Sql dba

613


What is Difference Between Unique and Primary Key Constraints?

609


Determine if oracle date is on a weekend?

558