declare @x int, @y int, @z varchar(4000)
select @x = 9, @y = 1, @z =' '
while @x >= 1
begin
set @y = @x
while @y >= 1
begin
select @z = convert(char(1),@y) + '*' + convert(char(1),@x) + '=' + convert(char(3),@x*@y) + ' ' + @z
set @y = @y - 1
end
set @z = char(13) + @z
set @x = @x - 1
end
print @z