How to get second highest salary from a table

Answer Posted / saiz

select min(salary)
from emp
where salary in ( select top 2 salary
from emp
order by salary desc);

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Difference Between Unique and Primary Key Constraints?

827


how to shut down the server with 'mysqladmin'? : Sql dba

737


Explain the select statement in sql?

823


where are cookies actually stored on the hard disk? : Sql dba

785


how can I make a script that can be bi-language (supports english, german)? : Sql dba

728






How to run sql*plus commands in sql developer?

800


how many sql ddl commands are supported by 'mysql'? : Sql dba

702


When sql appeared?

815


What is the difference between a database and a relational database?

765


What is an emotional trigger?

696


what are date and time data types in mysql? : Sql dba

686


Is postgresql a server?

736


Is truncate ddl or dml?

751


When can we use the where clause and the having clause?

778


How do I partition in sql?

704