0
UPDATE Customer C
SET name = B.name,
age = B.age
FROM (SELECT A.*, B.* FROM CUSTOMER_TEMP WHERE A.ID = B.ID) AS B
我得到了一個SQL如上,我運行查詢後,它將我所有的行更新爲相同的結果。Postgresql更新與子查詢
我不知道我需要
UPDATE Customer C
SET name = B.name,
age = B.age
FROM (SELECT A.*, B.* FROM CUSTOMER_TEMP WHERE A.ID = B.ID) AS D
WHERE C.ID = D.ID
經過這裏,但我得到這個ID是模糊的最後查詢。