Looping with the WHILE Statement
WHILE <Boolean expression>
<sql statement> |
[BEGIN
<statement block>
[BREAK]
<sql statement> | <statement block>
[CONTINUE]
END]
WHILE 1 = 1
BEGIN
WAITFOR TIME '01:00'
RAISERROR('Statistics Updated for Database', 1, 1) WITH LOG
END
Related examples in the same category