--if语句
declare @i int set @i=1 if @i<0 begin set @i=@i+1 print @i end else
--循环语句 declare @i int set @i=0 while @i<5 begin set @i= @i+1 insert into grade(classname) values(@i) end
--if语句
declare @i int set @i=1 if @i<0 begin set @i=@i+1 print @i end else
--循环语句 declare @i int set @i=0 while @i<5 begin set @i= @i+1 insert into grade(classname) values(@i) end
转载于:https://www.cnblogs.com/justqi/p/5984135.html