can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / sabin v jacob
SELECT Min(Sal) FROM (SELECT TOP 2 Sal FROM emp ORDER BY
Sal desc) as Temp
or
SELECT Min(Sal) FROM emp WHERE Sal IN(SELECT TOP 2 Sal FROM
emp ORDER BY Sal DESC)
| Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
You want to implement the one-to-one relationship while designing tables. How would you do it?
Explain user defined views?
Can You Use A Stored Procedure To Provide Data To An Ssrs Report?
Describe in brief authentication modes in sql server.
What are triggers in ms sql server?
What are the advantages of partitioning?
Where sql server usernames and passwords are stored in a sql server?
Explain the first normal form(1nf)?
How to drop an existing schema in ms sql server?
what is the difference between Delete and Truncate command in SQL
Name three of the features managed by the surface area configuration tool? : sql server security
How many types of triggers are there?
What is triggers and stored procedures?
How does clustered and non clustered index work?
What is the purpose of grouping data in a report?