ASP.NET - How to use loop (For while and Lookup in sql server 2008

Asked By bhanupratap singh on 23-Nov-12 11:43 PM
How to use loop in sql server stored procedure
thanks
Robbe Morris replied to bhanupratap singh on 24-Nov-12 10:07 AM
declare @row int
declare @maxRows int
set @row = 1
set @maxRows = 10

while(@row < @MaxRows)
BEGIN
   Set @Row = @Row + 1
END