Wednesday, February 22, 2012

While Statement in T-SQL

DECLARE @intFlag INT

DECLARE @endFlag INT

SET @intFlag = 1

SET @endFlag = 10

WHILE (@intFlag < = @endFlag)

BEGIN

PRINT @intFlag

SET @intFlag = @intFlag + 1

END

GO

No comments: