字符串拼接CONCAT
SELECT CONCAT("姓名:",NAME,"年龄:",age) AS MSG FROM student;
字符串拼接组函数GROUP_CONCAT (可以选择分割符,排序操作)
SELECT GROUP_CONCAT(NAME ORDER BY ID SEPARATOR '|') as NAME FROM area GROUP BY pId
字符串拼接CONCAT
SELECT CONCAT("姓名:",NAME,"年龄:",age) AS MSG FROM student;
字符串拼接组函数GROUP_CONCAT (可以选择分割符,排序操作)
SELECT GROUP_CONCAT(NAME ORDER BY ID SEPARATOR '|') as NAME FROM area GROUP BY pId