oracle存储过程里余额累加怎么做

2024-12-05 00:31:59
推荐回答(2个)
回答1:

从中取出所有nck相同的hweight的值,是更新到所有nck相同的数据的hweight2字段中么? 这个是更新所有数据的hweight2为hweight的累加。 update tab a set hweight2=(select sum(hweight) from tab b where a.nck=b.nck group by nck); 更新hweigh...

回答2:

select sum(余额) from 表名