--Declare a Flag
DECLARE @Flag INT
--Assign Value to Flag
SET @Flag = 403
--Start LOOP
WHILE (@Flag < 408)
BEGIN
BEGIN
DELETE Connection WHERE ID=@Flag
PRINT @Flag
--Increment the flag Value
SET @Flag = @Flag + 1
END
--Condition for stopping the LOOP
IF(@Flag > 407)
BREAK
--Continue if Condition is Satisfied
ELSE
CONTINUE
END
OUTPUT:
(0 row(s) affected)
403
(0 row(s) affected)
404
(0 row(s) affected)
405
(0 row(s) affected)
406
(0 row(s) affected)
407
No comments:
Post a Comment