how to find the second highest salary from emp table?
Answer Posted / esakki
select max(salary) from employee where salary not in (select
top 1 salary from employee order by salary desc )
change 1 to 2,3,4,......like that for 3rd max ,4th max
salary.....
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
how to select unique records from a table? : Sql dba
What are different types of functions in sql?
What is the difference among union, minus and intersect?
what are sequences
What is cross join sql?
How would you reference column values before and after you have inserted and deleted triggers?
What is dense_rank in sql?
How do you respond to dementia behavior?
Define select, insert, create, delete, update, drop keywords
What is data control language (dcl)?
What is a full join sql?
what is column? : Sql dba
what are the nonstandard string types? : Sql dba
What are character functions in sql?
Which is better cte or subquery?