PL/SQL Best Practices [12][If Statements]-ELSIF clauses
The implication of ELSIF clauses is that if one condition is fulfilled, all others would fail -- they are mutually exclusive. The following IF statement is a classic misuse of ELSIF clauses. It might not cause any errors, but that would just be a matter of luck. In many cases, the issue of exclusivity is less obviously determined.
IF sal BETWEEN 0 AND 10000
THEN

ELSIF sal BETWEEN 10000 AND 20000
THEN

ELSIF sal BETWEEN 20000 AND 30000
THEN

END IF;

浙公网安备 33010602011771号