break in while loop 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