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

How delete all records from table in sql?

556


What are the different types of joins in sql?

585


What is numeric function sql?

545


what are date and time data types? : Sql dba

542


What is the difference between nvl function, ifnull function, and isnull function?

600






Advantages and disadvantages of stored procedure?

583


Name the operator which is used in the query for pattern matching?

507


How is pl sql different from sql?

550


What is the left table in sql?

522


Can I call a procedure inside a function?

556


How does a self join work?

522


What are the types of optimization?

523


What is difference between my sql and sql?

532


Enlist the advantages of sql.

573


What is the difference between python and sql?

524