注册 登录
编程论坛 Oracle论坛

求助这个T-SQL?????????

书香 发布于 2008-01-24 22:38, 1744 次点击
目的 小于 60分 所有成绩+2 不能超100
while(1=1)
if not exists(select a from tab where a<60)
break
else
update tab set a=a+2 where a!>98
______________________________________________
while exists(select a from tab where a<60)
update tab set a=a+2 where a!>98
上面书上写的下面是我自己写的
下面的弊端

我本来 a写的是*(懒得写一屁股篼关于列的单词)
老师先说思想错误 然后说 速度慢 接着走列....
想了半天没明白放学了
抓不到人问了
1 回复
#2
哈狄斯2010-11-30 23:21
貌似是一个死循环
1