我尝试使用 IP_ID 将一个表中的值更新为另一个表,以按照 sybtax 比较 2 个表
UPDATE EDWID02.CUSTOMER_MOBILE t1
SET T1.MOBILE = (
SELECT T2.MOBILE
FROM EDWID02.NEW_MOBILE t2
WHERE T1.IP_ID=T2.IP_ID)
我发现的错误是 DB2 数据库错误:
ERROR [21000] [IBM][DB2/AIX64] SQL0811N The result of a scalar fullselect,
SELECT INTO statement, or VALUES INTO statement is more than one row.
SQLSTATE=21000
即使我将 = 更改为它告诉我另一个错误 DB2 数据库错误:
ERROR [42601] [IBM][DB2/AIX64] SQL0104N An unexpected token "in" was found
following "t1 SET T1.MOBILE". Expected tokens may include: "=".
SQLSTATE=42601
我在 DB2 中编码。