Make delicious recipes!

While Statement

DECLARE @Counter INT
SET @Counter = 0

WHILE @Counter <>
  BEGIN
    SET @Counter = @Counter + 1
    IF @Counter <>
        PRINT 'The counter : ' + CAST(@Counter AS CHAR)
    ELSE IF @Counter > 3 AND @Counter <>
    BEGIN
        CONTINUE
        PRINT 'No Counter Here'
    END
    ELSE IF @Counter > 13 AND @Counter <>
        BREAK
    ELSE
        PRINT 'The counter : ' + CAST(@Counter AS CHAR)
  END



Like us on Facebook to remain in touch
with the latest in technology and tutorials!


Got a thought to share or found a
bug in the code?
We'd love to hear from you:

Name:
Email: (Your email is not shared with anybody)
Comment:

Facebook comments:

Site Owner: Sachin Goyal