mysql连接两个字段
concat 中有一个写法是用于连接两个字段(列)的:concat_ws ----(ws: with separator)语法为:concat_ws('分隔符', str1, str2,...)例如:连接last_name,first_name,中间用 空格 分开:select concat_ws(' ', last_name, first_name) as Namefrom employees.
·
concat 中有一个写法是用于连接两个字段(列)的:
concat_ws ----(ws: with separator)
语法为:
concat_ws('分隔符', str1, str2,...)
例如:连接 last_name,first_name,中间用 空格 分开:
select concat_ws(' ', last_name, first_name) as Name
from employees
更多推荐
已为社区贡献2条内容
所有评论(0)