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 / bennison terry
Select Top 1 * from Tbl_Salary where ID not in (Select top 1 ID from tbl_salary order by salary desc) order by Id desc
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Define magic tables in sql server?
What samples and sample databases are provided by microsoft?
How to insert new line characters into strings?
What is the use of @@spid?
How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?
How to add an address record into adventureworkslt?
Do you know query execution plan?
What is a result set object returned by mssql_query()?
Explain following error properties?
Does index slows down insert statements?
Why main is user defined function?
what is the system function to get the current user's user id? : Sql server database administration
How can you insert null values in a column while inserting the data?
What is SQL Azure?
Do you know what is normalization of database? What are its benefits?