jia Jimmy
jia Jimmy

Reputation: 1848

How can I use line-break as separator in group_concat function MYSQL?

How can I use line-break (CHAR(10)) as the separator of function GROUP_CONCAT in mysql?

I 've tried GROUP_CONCAT(name SEPARATOR CHAR(10)) but failed.

Upvotes: 2

Views: 2421

Answers (1)

fancyPants
fancyPants

Reputation: 51928

You can simply use '\n', like in

GROUP_CONCAT(name SEPARATOR '\n')

Upvotes: 5

Related Questions