how can we find nth max salary from A table
Answers were Sorted based on User's Feedback
Answer / asp
select * from table1 a where (n-1) = (select count(distinct
(sal)) from table1 b where b.sal>a.sal)
Is This Answer Correct ? | 15 Yes | 5 No |
Answer / bhaskar reddy
select * from table1 a where(n-1)= (select count(distinct
sal) from table1 b where b.sal>a.sal)
Is This Answer Correct ? | 6 Yes | 5 No |
Answer / sivaraman
select * from table1 a where n = (select count(distinct
(sal)) from table1 b where b.sal>a.sal)
n is value of n it should be numeric....
Is This Answer Correct ? | 15 Yes | 15 No |
Answer / a
select MAX(Salary) from Employee
WHERE Salary NOT IN (select MAX(Salary) from Employee )
Is This Answer Correct ? | 0 Yes | 9 No |
What is dynamic SQL?
pls tell me abt the normalization five types....
Is db2 a mainframe?
what is the total syntax for fetch ? can any one please give me all the details of fetch ? thx
Explain about open switch business continuity software?
wht displays the number of times a query modified ?
What is a Cartesian product?
What is meant by explain?
What are the various isolation levels possible?
How to resolve -504 sql code in DB2?
max number of columns in a db2 table?
What are the rules for db2 programming?