Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / prem chhappesh

select max(salary) from emoplyee where salary not in(select max(salary) from employee)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to use myisamchk to check or repair myisam tables? : Sql dba

505


Why do we use %rowtype & %type in plsql?

601


How do you update sql?

519


how to decrement dates by 1 in mysql? : Sql dba

582


Can we use loop in sql?

533






Where are my tempfiles, I don't see them in v$datafile or dba_data_file?

546


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

552


Why do we need sharding?

525


What does where 1 1 mean in sql?

541


How do I start sql from command line?

531


What is sql scripting?

557


how to extract a unit value from a date and time? : Sql dba

556


how to start mysql server? : Sql dba

609


What is foreign key sql?

550


What is a sql instance vs database?

572