SQL IF ELSE BEGIN END
Posted
by Swami
on Stack Overflow
See other posts from Stack Overflow
or by Swami
Published on 2009-09-28T20:04:11Z
Indexed on
2010/05/09
5:28 UTC
Read the original article
Hit count: 365
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)
© Stack Overflow or respective owner