declare @x int
set @x = 1
while @x <=9
begin
declare @y int
set @y = 1
declare @txt nvarchar(4000)
set @txt = ''
while @y <= @x
begin
set @txt = @txt +' '+ cast(@y as nvarchar) +'*'+ cast(@x as nvarchar) +'='+ cast( (@x * @y) as nvarchar)
set @y=@y+1;
end
print @txt
set @x=@x+1;
print char(10)
end
sql server t-sql 写99乘法表
最新推荐文章于 2022-01-09 22:00:53 发布