如果我在另一个表有多个与外键匹配的值时使用 INNER JOIN 更新一个表会发生什么。
update
customer
SET
customer.chosen_phone = phone.number
FROM
customer c
INNER JOIN
phone p
ON
c.id = p.customer_id
customer
--------
id chosen_phone
-- ------------
10 ?
phone
-----
customer_id number
----------- ------
10 555-123-4567
10 888-999-0000
10 111-222-3333
谢谢!