# CONCAT\_WS

`CONCAT_WS` stands for concatenation with separator.

The first argument is a separator that is placed in between the remaining arguments when concatenating them together. If any of the expressions is NULL it is skipped in the concatenated output.

## Syntax

```sql
CONCAT_WS(separator, expression, [ expression, [expression ...]])

```

## Arguments

* separator: A separator expression. This may be a column name, the result of another function, or a math operation.
* expression: any set of expressions. This may be a column name, the result of another function, or a math operation.

## Return Type

The concatenated string.

## Examples

```sql
SELECT CONCAT_WS('a','1','2','3');

```

```output

+----------------------------+
| CONCAT_WS('a','1','2','3') |
+----------------------------+
| 1a2a3                      |
+----------------------------+

```

```sql
SELECT CONCAT_WS('a','1',NULL,'3');

```

```output

+-----------------------------+
| CONCAT_WS('a','1',NULL,'3') |
+-----------------------------+
| 1a3                         |
+-----------------------------+
```

## Related Topics

* [CONCAT](https://docs.singlestore.com/db/v9.1/reference/sql-reference/string-functions/concat.md)

***

Modified at: February 27, 2023

Source: [/db/v9.1/reference/sql-reference/string-functions/concat-ws/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/string-functions/concat-ws/)

(An index of the documentation is available at /llms.txt)
