mysqlgroup-concatnon-printing-characters

MySQL group_concat SEPARATOR char or ascii


Is there a way in MySQL to define a SEPARATOR in group_concat() with a non printable sign? Like ascii 3 or something like that?

i tried

group_concat(text SEPARATOR char(3))

and

group_concat(text SEPARATOR 3)

both of them doesn´t work.

Maybe a way to escaping?

I get long texts and i want to be sure that no printable sign will destroy my content. So i want to seperate them with a non printable sign...

any ideas?


Solution

  • I found a way! e.g. you want to seperat with ascii 3, you have to use:

    group_concat(text SEPARATOR 0x3)