can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / preeti chauhan
CREATE TABLE T1(SALARY int, [NAME] varchar(50))
SELECT TOP 1 SALARY FROM (SELECT TOP 2 SALARY FROM T1 ORDER
BY SALARY DESC)T1 ORDER BY SALARY
| Is This Answer Correct ? | 15 Yes | 3 No |
Post New Answer View All Answers
How can we check the sql server version?
What is the difference between SQL notification and SQL invalidation?
Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture
How to loop through returning rows?
What are the types of sql server?
Do you know what are the reporting services components?
You are creating an application where users are asked their gender in the gender combo box you have three options: ‘male’ , ‘female’ and ‘i choose not to disclose’ these options are stored in the table as 1, 0 or null which datatype should you use?
What is user defined datatypes and when you should go for them?
How will you optimize a stored procedure optimization?
What is normalization? Describe its different types.
IF more than one Site is accessing the same Database server and I want to move the DB with Minimum down time? How will you do
Why is sql server log file full?
Mention the 3 ways to get a count of the number of records in a table.
What is a view in sql?
Benefits of Stored Procedures?