美文网首页
hive - concat_ws 函数

hive - concat_ws 函数

作者: IsComing乜邪 | 来源:发表于2020-04-27 12:54 被阅读0次

    concat_ws 函数 

      concat_ws 函数在连接字符串的时候,只要有一个字符串不是NULL,就不会返回NULL,concat_ws 函数需要指定分隔符。

    hive> select concat_ws('-','a','b');

    a-b

    hive> select concat_ws('-','a','b',null);

    a-b

    hive> select concat_ws('','a','b',null);

    ab

    相关文章

      网友评论

          本文标题:hive - concat_ws 函数

          本文链接:https://www.haomeiwen.com/subject/wrsywhtx.html