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 / sudip mondal
select top 1 from employee where ID in (select top2 ID from
employee order by Salary desc) order by Salary asc
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is it possible to create trigger on views?
How do you send email on SQL Server?
How to use old values to define new values in update statements in ms sql server?
What are subqueries in sql server? Explain its properties.
what are constraints? Explain different types of constraints? : Sql server database administration
How is sql used in sql server?
What are the advantages of sql azure?
What are the advantages of log shipping?
Write a program using SQL queries to find a unique entry in a table.
Explain the various types of concurrency problem?
What are database states in ms sql server?
What is extent? Types of extents?
What is the difference between writing data to mirrored drives versus raid5 drives
What is the difference between an index and a unique index?
What is an entity-relationship diagram (erd)?