mysql字符串组\u concat给我一个错误

r6vfmomb  于 2021-06-21  发布在  Mysql
关注(0)|答案(1)|浏览(370)

当我尝试这个sql时,这里出现了一个错误。。。

SELECT customers.customers_first_name GROUP_CONCAT(customers_groups.customers_hash SEPARATOR '') 
FROM customers INNER JOIN customers_groups ON (customers.hash = customers_groups.customers_hash) 
GROUP BY customers.customers_entry_date

CUSTOMERS DATABASE
`customers_id`, 
`customers_first_name`, 
`customers_surname`, 
`customers_telephone`, 
`customers_email`, 
`customers_telephone_active`, 
`customers_email_active`, 
`client_type`, 
`customers_hash`, 
`customers_entry_date`

CUSTOMERS_GROUPS
`groups_hash`
`customers_hash
f87krz0w

f87krz0w1#

理想情况下,您应该发布带有问题的错误消息,但请检查下面的解决方案。

SELECT customers.customers_first_name, GROUP_CONCAT(customers_groups.customers_hash SEPARATOR '') 
FROM customers INNER JOIN customers_groups ON (customers.hash = customers_groups.customers_hash) 
GROUP BY customers.customers_entry_date

选择customers.customers\u first\u name,
组\u concat之前的select语句中缺少“,”

相关问题