update 中字段取值的问题。
update table1 set vol = vol + 20, set Amount = price * vol where ...
这时 Amount中的vol是加过20的还是没加过20的?有什么说法?
[解决办法]
没加20的,
update table1 set vol = vol + 20,Amount = price * (vol+20) where ...
[解决办法]
加的,同行的
[解决办法]
原因他取的值都是deleted表中的值,而不是取的inserted表中的值