这有效:
SELECT DISTINCT HEX(group_uuid) AS hexid
FROM schema.table
>9B3D8DE01E1E049DA9F17D42B324AA66
>CDF112D740CE14EA08CA90E3C937DE8D
就像这个
SELECT GROUP_CONCAT('\'', HEX(group_uuid), '\' ') AS hexid
FROM schema.table
>'9B3D8DE01E1E049DA9F17D42B324AA66','9B3D8DE01E1E049DA9F17D42B324AA66' [etc...]
还有这个
SELECT GROUP_CONCAT(DISTINCT HEX(group_uuid) SEPARATOR '\' ') AS hexid
FROM schema.table
>9B3D8DE01E1E049DA9F17D42B324AA66' CDF112D740CE14EA08CA90E3C937DE8D
然而,这
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
才不是。
是否有某种可以替换的“前缀”关键字或我应该遵循的另一种语法?