Skip to main content

Return of boolean expressions should not be wrapped into an "if-then-else" statement

ZPA rule for PL/SQL and Oracle SQL · ReturnOfBooleanExpression

Return of boolean literal statements wrapped into IF-THEN-ELSE ones should be simplified.

Examples​

Noncompliant Code Example
IF expression THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
Compliant Solution
RETURN expression;