开发者

Join table rows by GROUP_CONCAT , failed! It's not working?

开发者 https://www.devze.com 2023-04-01 18:37 出处:网络
i don\'t know why it\'s not working. \"SELECT id GROUP_CONCAT(skill SEPARATOR \', \') FROM resume_skills GROUP BY id\";

i don't know why it's not working.

"SELECT id GROUP_CONCAT(skill SEPARATOR ', ') FROM resume_skills GROUP BY id";

i have a table resume_skills, then two fields id and skill. it return an error like this one :

ERROR: You have an error in your SQL synt开发者_高级运维ax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP_CONCAT(skill SEPARATOR ', ') FROM resume_skills GROUP BY id' at line 1

I haven't figure it out yet. Help?


You miss comma(,) between id and group.

Right query:

SELECT id, GROUP_CONCAT(skill SEPARATOR ', ') FROM resume_skills GROUP BY id
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号