SQL SERVER – Simple Example of WHILE Loop with BREAK and CONTINUE
WHILE statement sets a condition for the repeated execution of an SQL statement or statement block. Following is very simple example of WHILE Loop with BREAK and CONTINUE. USE AdventureWorks; GO DECLARE @Flag INT SET @Flag = 1 WHILE (@Flag < 10) BEGIN BEGIN PRINT @Flag SET @Flag = @Flag…
Read More