Files
doris/docs/en/sql-reference/sql-functions/string-functions/concat_ws.md
ZhangYu0123 1d9b3aeee7 [Doc] Repair document format (#4336)
The error format '##keyword' in a lot of docs. This pr is to repair document format. #4335
2020-08-13 23:39:41 +08:00

1.8 KiB

title, language
title language
Concat_ws en

Concat_ws

Description

Syntax

'VARCHAR concat ws (VARCHAR sep., VARCHAR str,...)'

Using the first parameter SEP as a connector, the second parameter and all subsequent parameters are spliced into a string. If the separator is NULL, return NULL. The concat_ws function does not skip empty strings, but NULL values.

example

mysql> select concat_ws("or", "d", "is");
+----------------------------+
| concat_ws('or', 'd', 'is') |
+----------------------------+
| doris                      |
+----------------------------+

mysql> select concat_ws(NULL, "d", "is");
+----------------------------+
| concat_ws(NULL, 'd', 'is') |
+----------------------------+
| NULL                       |
+----------------------------+

mysql> select concat_ws("or", "d", NULL,"is");
+---------------------------------+
| concat_ws("or", "d", NULL,"is") |
+---------------------------------+
| doris                           |
+---------------------------------+

keyword

CONCAT_WS,CONCAT,WS