MySQL snafoo with GROUP_CONCAT <p>This works:</p> <pre><code>SELECT DISTINCT HEX(group_uuid) AS hexid FROM schema.table &gt;9B3D8DE01E1E049DA9F17D42B324AA66 &gt;CDF112D740CE14EA08CA90E3C937DE8D </code></pre> <p>as does this</p> <pre><code>SELECT GROUP_CONCAT('\'', HEX(group_uuid), '\' ') AS hexid FROM schema.table &gt;'9B3D8DE01E1E049DA9F17D42B324AA66','9B3D8DE01E1E049DA9F17D42B324AA66' [etc...] </code></pre> <p>and this </p> <pre><code>SELECT GROUP_CONCAT(DISTINCT HEX(group_uuid) SEPARATOR '\' ') AS hexid FROM schema.table &gt;9B3D8DE01E1E049DA9F17D42B324AA66' CDF112D740CE14EA08CA90E3C937DE8D </code></pre> <p>this, however,</p> <pre><code>SELECT GROUP_CONCAT('\'', DISTINCT HEX(group_uuid), '\' ') AS hexid FROM schema.table Error Code: 1064. You have an error in your SQL syntax; INSERT COIN </code></pre> <p>does not.</p> <p>Is there some kind 'PREFIX' keyword that can be substituted or another syntax I'm supposed to follow?</p>