Declaration
CONCAT_WS(separator, str1, .., strN)
Description
Concatenates multiple strings into one string, separating adjacent strings with separator. If a parameter contains NULL, the NULL value is ignored.
This function does not ignore empty strings.
Examples
obclient> SELECT
CONCAT_WS('_', 'First', 'Second'),
CONCAT_WS('_', 'First', NULL, 'Second')
\G
*************************** 1. row ***************************
CONCAT_WS('_', 'First', 'Second'): First_Second
CONCAT_WS('_', 'First', NULL, 'Second'): First_Second
1 row in set