View previous topic :: View next topic
|
Author |
Message |
rolen Warnings : 1 New User
Joined: 26 Mar 2005 Posts: 6
|
|
|
|
hi,
cananybosy give me the logic for finding the nth maximum of a column in a DB2 TABLE. if yes, plz write the select clause statement. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
Back to top |
|
|
nrsmca
New User
Joined: 25 May 2005 Posts: 14
|
|
|
|
Hi use this one...
SELECT a.SALARY FROM EMPTABLE a WHERE N = (SELECT COUNT(*) FROM EMPTABLE b WHERE b.SALARY >= a.SALARY) ;
It runs perfect. |
|
Back to top |
|
|
|