Product Solutions Support
Try MemSQL

CONCAT_WS

CONCAT_WS stands for concatenation with seperator. The first argument is a seperator that is placed inbetween the remaining arguments when concatenating them together. If any of the expressions is NULL it is skipped in the concatenated output.

CONCAT_WS(seperator, expression, [ expression, [expression ...]])

Arguments

Return Type

The concatenated string.

Examples

memsql> select concat_ws('a','1','2','3');
+----------------------------+
| concat_ws('a','1','2','3') |
+----------------------------+
| 1a2a3                      |
+----------------------------+

memsql> select concat_ws('a','1',NULL,'3');
+-----------------------------+
| concat_ws('a','1',NULL,'3') |
+-----------------------------+
| 1a3                         |
+-----------------------------+
Was this article useful?