Skip to main content

Collapsible "if" statements should be merged

ZPA rule for PL/SQL and Oracle SQL · CollapsibleIfStatements

Merging collapsible if statements increases the code's readability.

Examples​

Noncompliant Code Example
if condition1 then
if condition2 then
-- code
end if;
end if;
Compliant Solution
if condition1 and condition2 then
-- code
end if;