how to find the second highest salary from emp table?

Answer Posted / shanmugasundaram

select min(salary) from tblempsal where salary in(select
distinct
top 2 salary from
tblempsal order by salary desc)

Is This Answer Correct ?    20 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is sql? : Sql dba

552


What is a native sql query?

486


Can you sum a count in sql?

548


How to rename a column in the output of sql query?

527


What are the two parts of design view?

573






What is sql comments?

646


What is trigger in sql?

573


If the application is running very slow? At what points you need to go about the database in order to improve the performance?

559


What is auto increment?

575


What are the different ways to optimize a sql query?

481


What do you mean by “trigger” in sql?

608


Can we use join in subquery?

563


Explain the significance of the & and && operators in pl sql.

563


What is 19 null in sql?

526


Can we use view in stored procedure?

495