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 / belson gnana pradeep
Select Top 1 salary from (Select TOP 2 salary from tbl_salary order by salary desc)a order by salary
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the commands used in DCL?
Define indexes?
What is the sql server 2000 version number?
what is the difference between a primary key and a unique key? : Sql server database administration
What are sql server functions?
What is always encrypted?
What is factless fact table? : sql server analysis services, ssas
What is difference between index and primary key?
Do you have any idea about the tcl commands?
Can we add a cpu to sql server?
Can you explain important index characteristics?
Write down the syntax and an example for create, rename and delete index?
Can we shrink data file in sql server?
What is the maximum rows in sql server table?
What is subquery in sql?