【发布时间】:2020-07-08 19:17:23
【问题描述】:
如何根据另一列设置一列的值?
目标:当 DB 表中的列 Remote = table SO 中的列 Thrunode -> 在表 DB 中设置列 customer = table SO
DB = tbl_db_collecting
SO = tb_systemshc
sql:
UPDATE tbl_db_collecting SET
tbl_db_collecting.customer = tb_systemshc.environment
FROM tb_systemshc
WHERE tbl_db_collecting.lower(remote) = tb_systemshc.lower(thrunode)
输出:
SQL Error [3F000]: ERROR: schema "tbl_db_collecting" does not exist
【问题讨论】:
标签: postgresql join sql-update