Code Analysis

ST005

IF or ELSE without BEGIN...END block

Note: By default, this rule is set to "Ignore". To enable it, set it to "Warning" in the Rules dialog.

It is recommended to use BEGIN...END as a wrapper for a block of code in IF or ELSE statements.
Although, in theory you only need a block wrapper if more than one statement is used in an IF ELSE sequence It is easy to get statements wrong if you leave out the BEGIN…END

Available in

SQL Code Guard



Didn't find what you were looking for?