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
Name three of the features managed by the surface area configuration tool? : sql server security
Explain difference between cross join and full outer join?
What is the federation in sql azure?
How you can minimize the deadlock situation?
What are triggers? How do you invoke a trigger on demand?
How to maintain a fill factor in existing indexes?
What are the properties of primary key?
How to drop an existing table with "drop table" statements in ms sql server?
How do users use Report Builder with SQL Server data sources?
What is create statement?
What are sql servers used for?
Define indexes?
How to use transact-sql statements to access the database engine?
how to do partition in sqlserver
What command is used to rename the database?