adspace


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


Please Help Members By Posting Answers For Below Questions

Why and when do stored procedure recompile?

1056


What are the different subsets of sql?

1648


When should you use an instead of trigger?

1050


Can one drop a column from a table?

1087


How to connect php with different port numbers?

1185


Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60

2293


Why should you use or avoid select * statements?

1108


do you know how to configure db2 side of the application? : Sql server database administration

1122


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1132


If any stored procedure is encrypted, then can we see its definition in activity monitor?

1068


Can we do dml on views?

1035


What is clustered index

1085


How can we solve concurrency problems?

1121


What is a view in sql?

1039


How to enter binary string literals in ms sql server?

1243