Skip to main content

Dead code should be removed

ZPA rule for PL/SQL and Oracle SQL · DeadCode

Jump statements (return, exit, continue, and raise) move control flow out of the current code block. Typically, any statements in a block that come after a jump are simply wasted keystrokes lying in wait to confuse the unwary.

Examples​

Noncompliant Code Example
begin
raise my_error;
log('finished'); -- this code will never be executed
end;
Compliant Solution
begin
raise my_error;
end;