CONCAT_WS(separator,str1,str2,...) : CONCAT_WS : String Functions MySQL TUTORIALS


MySQL TUTORIALS » String Functions » CONCAT_WS »

 

CONCAT_WS(separator,str1,str2,...)


The first argument is the separator for the rest of the arguments.

If the separator is NULL, the result is NULL.

CONCAT_WS() does not skip empty strings.

CONCAT_WS() does skip any NULL values after the separator argument.

mysql>
mysql>
mysql> SELECT CONCAT_WS(',','First name','Second name','Last Name');
+-------------------------------------------------------+
| CONCAT_WS(',','First name','Second name','Last Name') |
+-------------------------------------------------------+
| First name,Second name,Last Name                      |
+-------------------------------------------------------+
row in set (0.02 sec)

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo String Functions
» CONCAT_WS