How to organize infinite while loop in mssql ?
- by alpav
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.