Name
CONCAT_WS()
Synopsis
CONCAT_WS(separator
,str1
,str2
, ...)
Works in the same way as CONCAT
, except it inserts a separator
between the items being concatenated. If the separator is NULL
the result will be NULL
, but NULL
values can be used as other arguments,
which will then be skipped. This code returns the string
âTruman,Harry,Sâ:
SELECT CONCAT_WS(',' 'Truman', 'Harry', 'S');
Get Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.