Cita:
Short-Circuit Evaluation
When evaluating a logical expression, PL/SQL uses short-circuit evaluation. That is,
PL/SQL stops evaluating the expression as soon as the result can be determined.
This lets you write expressions that might otherwise cause an error. Consider the
following OR expression:
DECLARE
...
on_hand INTEGER;
on_order INTEGER;
BEGIN
..
IF (on_hand = 0) OR ((on_order / on_hand) < 5) THEN
...
END IF;
END;
When the value of on_hand is zero, the left operand yields TRUE, so PL/SQL need
not evaluate the right operand. If PL/SQL were to evaluate both operands before
applying the OR operator, the right operand would cause a division by zero error. In
any case, it is a poor programming practice to rely on short-circuit evaluation.
|
lo que yo entiendo de esto es que cuando la evalución de izquierda es verdadera PL/SQL no necesita evaluar datos de la parte derecha por lo tanto debería traerme solo los registros de coincidan con el valor 1.
Hasta Luego y gracias por su atención