如何根据前面字段的判断条件,来设定后面字段是否为

2025-05-21 13:47:45
推荐回答(1个)
回答(1):

提个问题,不是最大,如果最大值有2个怎么办?
语句可以这样写
update a set ZT = 1
from Table a

where exists(select * from Table where WL = a.WL and BB > a.BB)