一、Mysql
使用concat函数
## 可以拼接多个列
select concat(app_name,',',url) as str from apps
# 使用concat_ws函数
## CONCAT_WS(separator,str1,str2,...)
## separator,分隔符
## str1,str2为要拼接的字符
select CONCAT_WS(',',app_name,url) as str from apps
二、Oracle
-- 使用concat函数
---- 只能传两个参数,因此,如果需要拼接多个字符串,可是嵌套concat函数达到需求,不过不推荐
select concat(app_name,url) as str from apps
-- 使用 ||
---- 可以拼接多个字符
select app_name || ',' || url as str from apps
三、SQLServer
+号连接,列名用+连接查询
四、UNION
select tp.combination_name as t
from
t_service_price as tp;
UNION
select tp.subheading as t
from
t_service_price as tp;