我想用另一个表中的值更新一个表,但是这些表没有直接链接,所以我必须先通过另一个表。
UPDATE properties
SET
properties.method = p_payment.method,
properties.bank = p_payment.bank,
properties.bank_account_nr = p_payment.bank_account_nr,
properties.payment_note = p_payment.notes,
properties.insurance_policy = p_payment.insurance_policy
FROM properties, leads, p_payment
WHERE properties.owner = leads.id_lead
AND leads.payment_id = p_payment.payment_id;
我收到以下错误:
1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 8 行的“FROM properties,leads,p_payment WHERE properties.owner = Leads.id_lead AND l”附近使用正确的语法
谁能帮我吗?提前致谢。