PL/SQL Best Practices [14][If Statements]-IFs and Booleans
Avoid IF With Booleans
Sometimes you will code or come across conditional statements which, while valid, are unnecessary and cumbersome. Replace this IF statement:
IF hiredate < SYSDATE
THEN
date_in_past := TRUE;
ELSE
date_in_past := FALSE;
END IF;With this:
date_in_past :=
hiredate < SYSDATE;You can assign a Boolean expression directly to a Boolean variable.

浙公网安备 33010602011771号