If there are no begin and end statements in sql, the next statement is the only one that gets executed if the if condition is true…in the case below, is there anyway the insert statement will also get executed if the if condition is true?
IF (a > 1)
SET @b = 1 + 2
INSERT INTO #F (a, b, c) VALUES (1, 2, 3)
The insert statement will be called in all cases independent of the if clause as the if clause will just be the one line
if you are not certain add the begin and end (actually I always add begin and end as even if it is one line to begin with you never know when you or someone else will need to add another line)