我对MySQL很陌生,你们能帮我吗?
询问:
UPDATE users u,
posts p
SET u.tags = (SELECT group_concat(Tags)
FROM (SELECT DISTINCT Tags,
user_id
FROM posts
GROUP BY tags,
user_id) AS p
GROUP BY user_id)
WHERE u.user_id = p.user_id;
错误:
ERROR 1242 (21000): Subquery returns more than 1 row