I Have Employee table having column name as ID,SALARY
how to get second max salary from employee table with id
ex
ID SALARY
1 20000
7 37000
2 5000
Answer Posted / elumalai.k
select id,max(salary)from employee where salary<(select
max(salary)from employee)
Is This Answer Correct ? | 15 Yes | 6 No |
Post New Answer View All Answers
List few advantages of stored procedure.
How do I clean up sql server transaction log?
Do you know the isolation level that sql server support?
Explain datetime2 data type in sal server 2008?
Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?
Name and describe few console utilities for ssrs?
What are the different types of collation sensitivity in sql server?
List out the differences between the clustered index and non-clustered index in sql server?
Explain cdc and sql injection?
What is data set in report?
What is coalesce in sql server?
Can we call stored procedure in trigger?
Explain error and transaction handling in sql server?
Can you please differentiate between a primary key and a unique key?
What will be query used to get the list of triggers in a database?