1.concat
select concat("http://",host,":",port) from hostInfo
2.concat_ws concat with seperator
select concat("|", f1,f2 ) from table
3.group_concat group by 的加强版
select age, group_concat(name) from student_info group by age;
参见
本文深入探讨了SQL中用于字符串操作的聚合函数,包括CONCAT、CONCAT_WS和GROUP_CONCAT。通过具体实例,详细解释了每个函数的功能、用法以及应用场景。
1.concat
select concat("http://",host,":",port) from hostInfo
2.concat_ws concat with seperator
select concat("|", f1,f2 ) from table
3.group_concat group by 的加强版
select age, group_concat(name) from student_info group by age;
参见

被折叠的 条评论
为什么被折叠?