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 |
can i code union in cobol-db2 pgm ?
what is the difference between where clause and having clause
What is the use of value function?
How can you find out the # of rows updated after an update statement?
What is the use of with ur in db2?
What are data types?
Can a primary key have null values? If we try to insert a null value in a primary key column, will it work or give an error code?
What will the FREE command do to a plan?
Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.
What are the advantages of using a PACKAGE?
Cursors can be declared in both working-storage & procedure division, Agreed. But is there any difference? If could you please suggest what is the difference. TIA
What do you do to keep the cursor from closing after a commit?