MySQL 帶分隔符的字符連接 concat_ws 與concat
mysql教程> select concat_ws('-','123',456,'789');
+--------------------------------+
| concat_ws('-','123',456,'789') |
+--------------------------------+
| 123-456-789 |
+--------------------------------+
1 row in set (0.02 sec)
mysql>
concat實例
mysql> select concat('123',456);
+-------------------+
| concat('123',456) |
+-------------------+
| 123456 |
+-------------------+
1 row in set (0.00 sec)
mysql> select concat('123',456,'789');
+-------------------------+
| concat('123',456,'789') |
+-------------------------+
| 123456789 |
+-------------------------+
1 row in set (0.00 sec)
mysql>