SELECT
tel,
GROUP_CONCAT( workno SEPARATOR ',' ) AS workno
FROM
test
GROUP BY
tel;
去除重复的workno
SELECT
tel,
GROUP_CONCAT(DISTINCT workno SEPARATOR ',' ) AS workno
FROM
test
GROUP BY
tel;
SELECT
tel,
GROUP_CONCAT( workno SEPARATOR ',' ) AS workno
FROM
test
GROUP BY
tel;
去除重复的workno
SELECT
tel,
GROUP_CONCAT(DISTINCT workno SEPARATOR ',' ) AS workno
FROM
test
GROUP BY
tel;