how to find the second highest salary from emp table?

Answer Posted / shankar panda

SELECT DISTINCT(E.SALARY) FROM EMPLOYEES E WHERE 2=(SELECT COUNT(DISTINCT D.SALARY) FROM EMPLOYEE D WHERE D.SALARY >= E.SALARY)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what does it mean to have quoted_identifier on? : Sql dba

674


What are database links used for?

591


What are the different dml commands in sql?

584


How do I turn a list into a table?

504


What are the benefits of pl/sql packages?

539






What is rollback?

579


What does where 1/2 mean in sql?

527


What is cross join example?

549


What is the difference between left join and right join?

500


What is the maximum number of columns in sql table?

549


what is an index? : Sql dba

520


Can a foreign key be null?

586


What is the purpose of a sql?

522


What does partition by mean in sql?

511


What is the sql case statement?

574