How to organize infinite while loop in mssql ?
Posted
by alpav
on Stack Overflow
See other posts from Stack Overflow
or by alpav
Published on 2010-03-16T16:48:32Z
Indexed on
2010/03/16
16:51 UTC
Read the original article
Hit count: 275
I want to use infinite WHILE
loop in SQL 2005 and use BREAK
keyword to exit from it on certain condition.
while true
does not work, so I have to use while 1=1
.
Is there a better way to organize infinite loop ?
I know that I can use goto
, but while 1=1 begin .. end looks better structurally.
© Stack Overflow or respective owner