how to find the second highest salary from emp table?

Answer Posted / ashwini

select top 1 salary from emp where salary in (select top 2
salary from emp order by salary asc) order by salary 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 mysql_fetch_object and mysql_fetch_array? : Sql dba

556


What is left inner join in sql?

519


What is data manipulation language?

702


What are the three pl sql block types?

573


Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?

626






what is auto increment? : Sql dba

577


What is an escape character in sql?

567


How do you go back in sql?

535


What is pl/sql language case sensitive?

635


How do I delete a trigger?

547


what is recursive stored procedure? : Sql dba

530


How do I find duplicates in a single column in sql?

540


What is microsoft t sql?

491


What is pl sql and why it is used for?

575


How do I find duplicates in the same column?

549