當前我有3個帳戶使用相同的電子郵件地址,我想給一組功能的同一個電子郵件地址的散列鍵。運行的SQL語句是MySQL錯誤更新羣組
UPDATE customers (
SELECT customer_id, email, email_hash FROM customers GROUP BY email) AS t1
SET email_hash='123' WHERE email='[email protected]'
當我運行這個SQL查詢我得到這個錯誤。
#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 customer_id, email, email_hash, email_reg_status from customers group by' at line 1
我能做些什麼使用按功能分組相同的哈希鍵爲相同的電子郵件地址?
你不能更新你從中選擇一個表。 –