标签:
declare @sum int,@count intselect @sum=0,@count=0label_1:select @count=@count+1select @sum=@sum+@countif @count<=6 goto label_1select @count ‘数值‘,@sum ‘1~7累加和‘
运行结果:
用TRansact-sql 实现 n!
原文地址:http://www.cnblogs.com/tcOnLine/p/4179015.html