how to find the second highest salary from emp table?

Answer Posted / vikas naik

select max(sal) from employee where sal not in(select
max(sal) from employee);

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different tcl commands in sql?

618


What is the use of %rowtype?

535


What types of commands can be executed in sql*plus?

548


what are date and time functions in mysql? : Sql dba

530


How do I start sql profiler?

555






How to execute a stored procedure?

559


Which nosql database is best?

511


What are different sql data types?

513


What is difference between sql and excel?

513


How does cross join work in sql?

533


What does fetching a cursor do?

613


how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba

505


Is left join same as inner join?

535


Which one is better subquery or joins?

553


Does sql full backup truncate logs?

527