Sunday, 30 September 2018

SQL Server While Loop from 1 to 1000

declare @n as int=1
while @n <1001
begin
print @n;
set @n =@n+1
end;

No comments:

Post a Comment