CONCAT_WS
string transform
What changes
- Input
- string arguments
- Output or change
- string or integer
- Return type
- A string value whose length and type depend on the input.
Syntax at a glance
CONCAT_WS ( separator , argument1 , argument2 [ , argumentN ] ... )
Work example
Build a display label with one chosen separator between values.
Use a literal separator and verify how null values affect the output positions.
Check your work CONCAT_WS skips null value arguments but does not skip an empty string.
Practice SQL
Open in SQL FlowSELECT CONCAT_WS(' / ', 'North', NULL, 'Store') AS label;
Open Microsoft Learn for full syntax, permissions, and details for your version.