存储过程中能使用多条 update 语句更新同一个表1吗?
比如有5个条件:
CREATE TABLE Pabname
as
update 表1 set A=a+b where 条件1
update 表1 set B=c- where 条件2
update 表1 set C=e*f where 条件3
update 表1 set D=h/j where 条件4
update 表1 set ABCD=A+B*C/D where 条件5
go
可以在存储过程中直接写 这么多条update 语句 更新同一个表吗? 或者用事务?
TKS!