CONCAT_WS
Syntax
CONCAT_WS(separator, str1, .., strN)
Description
The CONCAT_WS function concatenates multiple strings into one string, with the separator between adjacent strings. If a parameter is NULL, it is ignored.
The function does not ignore empty strings.
Examples
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 (0.001 sec)