Loop

declare @index integer

set @index = 0
while @index < 10
begin
select ‘loop counter = ‘, @index
set @index = @index + 1
end