--while循环的操作
while not exists(select * from stu where b_id>200)
begin --begin end是语句块
update stu
set b_id=b_id+5
if(select max(b_id) from stu)>150
break
else
continue
end
-- 查看修改后的记录
select * from stu
--while循环的操作
while not exists(select * from stu where b_id>200)
begin --begin end是语句块
update stu
set b_id=b_id+5
if(select max(b_id) from stu)>150
break
else
continue
end
-- 查看修改后的记录
select * from stu