how to find the second highest salary from emp table?

Answer Posted / sankar

select * from emp where sal=(select max(sal) from emp where
sal not in(select max(sal) from emp))

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 functions, procedures, and packages in pl/sql?

487


How to check if a column is nullable before setting to nullable?

589


What are dml commands?

531


Explain the methods used to protect source code of pl/sql.

548


Which nosql database is best?

517






What is pl sql architecture?

504


what are ddl statements in mysql? : Sql dba

579


What is mutating trigger?

585


Which is faster count (*) or count 1?

544


what is a trigger in mysql? : Sql dba

607


Difference between table function and pipelined function?

589


What is the use of pl/sql table?

559


What does desc stand for?

593


What is primary key and unique key?

547


What does closing a cursor do?

768