通过 GROUP_CONCAT 连接表行,失败!它不起作用吗?
我不知道为什么它不起作用。
"SELECT id GROUP_CONCAT(skill SEPARATOR ', ') FROM resume_skills GROUP BY id";
我有一个表resume_skills,然后是两个字段id 和技能。 它返回这样的错误:
ERROR: 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 'GROUP_CONCAT(skill SEPARATOR ', ') FROM resume_skills GROUP BY id' at line 1
我还没有弄清楚。帮助?
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 syntax; 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您错过了 id 和 group 之间的逗号 (,)。
正确的查询:
You miss comma(,) between id and group.
Right query: