how to find the second highest salary from emp table?

Answer Posted / gurvinder

select max(sal)from emp where sal in(select sal from emp minus select max(sal) from emp);

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how would concatenate strings in mysql? : Sql dba

561


what is a constraint? Tell me about its various levels. : Sql dba

555


Can I learn sql in a week?

542


what is clause? : Sql dba

572


How many functions are there in sql?

532






What are the usages of sql?

558


What is a join query?

544


List different type of expressions with the example.

544


name 3 ways to get an accurate count of the number of records in a table? : Sql dba

559


How to pipe multiline string to isql?

568


What is date functions?

564


What is sql select statement?

497


How many tables can a sql database have?

526


Does truncate require commit?

535


Which query operators in sql is used for pattern matching?

535