table A

select (a.a1+a.a2) from A a;

通过多列相加获取列的和值。

更新同理,

update A a set a.a3 =  (a.a1+a.a3);