通过传递数字参数返回什么MySQL CONCAT()函数?

2023年12月22日08:57:49

MySQL允许我们将数字参数传递给CONCAT()函数。可以不使用引号将其传递。

示例

mysql> Select Concat(10,20);

+---------------+
| Concat(10,20) |
+---------------+
| 1020          |
+---------------+

1 row in set (0.00 sec)

甚至我们可以传递一个字符串参数和一个数字参数来实现CONCAT()如下功能:

mysql> Select CONCAT('DELHI ', 110006)AS 'City PIN CODE';

+----------------+
| City PIN CODE  |
+----------------+
| DELHI 110006   |
+----------------+

1 row in set (0.00 sec)

  • 更新时间:2023年12月22日08:57:49 ,共 386 字。