The MySQL string processing function concat_ws () is similar to the MySQL string processing function concat), but the processed strings are not the same. The following describes the MySQL string processing function concat_ws () in detail ().
Concat_ws () function, indicating concat with separator, which has a separator string connection
For example, separate the strings with commas (,).
- mysql> select concat_ws(',','11','22','33');
-
- +-------------------------------+
- | concat_ws(',','11','22','33') |
- +-------------------------------+
- | 11,22,33 |
- +-------------------------------+
- 1 row in set (0.00 sec)
Unlike concat, The concat_ws function does not return NULL because of the NULL value during execution.
- mysql> select concat_ws(',','11','22',NULL);
- +-------------------------------+
- | concat_ws(',','11','22',NULL) |
- +-------------------------------+
- | 11,22 |
- +-------------------------------+
- 1 row in set (0.00 sec)
How to view the three MySQL character sets
View MySQL Default Character Set
How MySQL defines foreign keys
MySQL foreign key syntax
MySql stored procedure with Parameters