SQL SERVER中直接循环写入数据
SQL SERVER中直接循环写入数据
declare @i int
set @i=1
while @i<20
begin
insert into test (userid) values(@i)
set @i=@i+1
end
没有及格的成绩,在每次增长0.1的基础上,使他们刚好及格
while((select min(score) from tb_table)<60)
begin
update tb_table set score =score*1.01
where score<60
if (select min(score) from tb_table)>60
break
else
continue
end