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

Answer Posted / karthik ramasamy

Select max(salary) from salarymaster where salary <(select
max(salary) from salarymaster)

OR

SELECT MAX(SALARY) FROM SALARYMASTER WHERE SALARY NOT IN
(SELECT MAX(SALARY) FROM SALARYMASTER)

OR

Select max(salary) from salarymaster where salary<(Select
max(salary) from salarymaster)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you have more than one trigger on a table?

532


what is column? : Sql dba

576


What is a mutating table and a constraining table?

575


What is time based sql injection?

492


What is before trigger?

558






What is percent sign in sql?

725


What is ttitle and btitle?

579


What are triggers and its types?

559


how to delete an existing column in a table? : Sql dba

556


What is the difference between between and in condition operators?

539


what is commit? : Sql dba

619


How do you truncate?

507


Mention what does the hierarchical profiler does?

566


Does mysql_real_escape_string prevent sql injection?

539


Which version of sql do I have?

566