Answers for "mysql select set string as column"

SQL
0

mysql select columns as string

-- Use GROUP_CONCAT()
-- GROUP_CONCAT() returns a string with concatenated non-NULL value from a group.
SELECT `name`,GROUP_CONCAT(`id`) as id FROM `table` group by `name`;
Posted by: Guest on August-20-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language