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 is database white box testing?
What are the types of subquery?
What is a data source or ds? : sql server analysis services, ssas
What are sp_configure commands and set commands?
What are system databases into sql server (2005/2008) : sql server database administration
what is the maximum size of a row? : Sql server database administration
How to create a simple user defined function in ms sql server?
explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
What is clr ddl trigger?
What is difference between count (*) and count 1?
What do you know about normalization and de- normalization?
In what sequence sql statement is processed?
What is a collation?
Difference between Inner vs outer joins?
Do you know what is similarity and difference between truncate and delete in sql?