Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在一个表中有 4 列,需要逐行添加这些列,并且这个结果需要在 postgres 中逐行更新到另一个表的列中。
在 Postgres 中,您可以from在update. 你的问题有点含糊,但是是这样的:
from
update
update toupdate set sumcol = (t1.col1 + t1.col2 + t1.col3 + t1.col4) from table1 t1 where t1.? = toupdate.?;
?用于标识两个表之间的行如何匹配的列。
?