while loop syntax sql server code example
Example: how to break a while loop in mssql
WHILE Boolean_expression
BEGIN
-- statements
IF condition
BREAK;
-- other statements
END
WHILE Boolean_expression
BEGIN
-- statements
IF condition
BREAK;
-- other statements
END