我正在尝试使用以下代码更新 mysql(xamp) 中的列-
UPDATE firm SET `fk_contact_details_id` = SELECT 'id' FROM contact_details WHERE contact_details.name = firm.name
但我收到以下错误:
*#1064 - You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'SELECT 'id' FROM contact_details WHERE
contact_details.name = firm.name' at line 1*
谁能告诉我我的陈述有什么问题吗?