ST005
Published 20 November 2017
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
This documentation contains proprietary information and is protected by copyright law.
Copyright © 2026 Red Gate Software Limited. All rights reserved