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 |
How do you define a correlated name?
how to fetch multiple records without using cursor
What is a db2 package?
How do run the JCL which has 25 steps by skipping the following steps 5, 10,15 and 25 without using COND statement
What is ACQUIRE/RELEASE in BIND?
What is EXPLAIN?
What is syscat in db2?
If the main program has only cobol statements and subprogram has the db2 statements what is the procedure for precompilation. for which program we need to do the precompilation
Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?
Explain db2.
wht is d/f b/w inner join and outer join ? d/f group by and order by having by ?
What is the physical storage length of the data types date, time, and timestamp?