日期:2014-05-17 浏览次数:20517 次
create function printTriangle(@line int) returns int as begin declare @i int set @i = 1 while @i <= @line begin print replicate(' ', @i - 1) + replicate('*', 2 * @i -1) set @i = @i + 1 end return 0 end