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
What is the difference between a view and a stored procedure?
What is linked report?
What do you mean by cardinality?
Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?
What are scalar functions?
Which table keeps information about stored procedures?
Would you store your query in a ssrs report or a database server? State the reason why?
What is analysis service repository?
Give the query of getting last two records from the table in SQL SERVER?
What are the differences between ms sql server & oracle?
List some of the rules that apply to creating and using a ‘view’
How to download and install microsoft sql server management studio express?
Does group by or order by come first?
What is the fastest way to permanently delete a 1 million row table named customers?
What is the fillfactor concept in indexes?