gpt4 book ai didi

mysql - 我的 MySQL 语句有什么问题?

转载 作者:行者123 更新时间:2023-11-29 09:20:39 25 4
gpt4 key购买 nike

UPDATE table1 SET announcer = ( SELECT memberid
FROM ( table1
JOIN users ON table2.username = table1.announcer
) AS a
WHERE a.username = table1.announcer )

#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 'a where a.username=table1.announcer)' at line 1

最佳答案

尝试:

UPDATE announcements a
SET announcer =
(SELECT memberid
FROM users u
WHERE u.username = a.announcer)

关于mysql - 我的 MySQL 语句有什么问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1934938/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com