|
|
Re: How to find the 4th maximum sal? [message #371015 is a reply to message #371008] |
Tue, 08 August 2000 09:18 |
Vjeko
Messages: 15 Registered: August 2000
|
Junior Member |
|
|
The solution with rownum is valid only if inserting into table was order by salary. If insertin was in some random way it won't work fine because ROWNUM returns a number indicating the order in which ORACLE selects the row from a table or set of joined rows. It is not affected by ORDER BY clause.
The best way to find the 4th maximum sal would be using PL/SQL. Of couse, it can be done in SQL but it would be an ugly statment.
|
|
|
|