MySQL字符串连接

mysql> select concat('Hadoop:','Hive:','Spark#','HBase;',TBL_TYPE,'{}',SD_ID) from TBLS;

| Hadoop:Hive:Spark#HBase;MANAGED_TABLE{}6                        |

| Hadoop:Hive:Spark#HBase;MANAGED_TABLE{}7                        |

| Hadoop:Hive:Spark#HBase;MANAGED_TABLE{}12                       |

 

 

mysql> select concat_ws(':','Hadoop','Hive','Spark','HBase',TBL_TYPE,SD_ID) from TBLS;

| Hadoop:Hive:Spark:HBase:MANAGED_TABLE:6                       |

| Hadoop:Hive:Spark:HBase:MANAGED_TABLE:7                       |

| Hadoop:Hive:Spark:HBase:MANAGED_TABLE:12                      |

 

posted @ 2015-07-20 23:37  智能先行者  阅读(493)  评论(0编辑  收藏  举报