拼接函数
concat(STRING|BINARY a, STRING|BINARY b…)
Returns the string or bytes resulting from concatenating the strings or bytes passed in as parameters in order. For example, concat(‘foo’, ‘bar’) results in ‘foobar’. Note that this function can take any number of input strings.
返回结果为连接参数产生的字符串,如果有任何一个参数为null,则返回值为null。
select concat('abc','def','gh',123)
abcdefgh123
concat_ws(STRING sep, STRING a, STRING b…), concat_ws(STRING sep, Array)
和concat()一样,将多个字符串连接成一个字符串,但是可以一次性指定分隔符~(concat_ws就是concat with separator)
语法:concat_ws(separator, str1, str2,