Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 708 Bytes

File metadata and controls

38 lines (28 loc) · 708 Bytes

concat

description

Syntax

VARCHAR concat(VARCHAR,...)

将多个字符串连接起来, 如果参数中任意一个值是 NULL,那么返回的结果就是 NULL

example

MySQL > select concat("a", "b");
+------------------+
| concat('a', 'b') |
+------------------+
| ab               |
+------------------+

MySQL > select concat("a", "b", "c");
+-----------------------+
| concat('a', 'b', 'c') |
+-----------------------+
| abc                   |
+-----------------------+

MySQL > select concat("a", null, "c");
+------------------------+
| concat('a', NULL, 'c') |
+------------------------+
| NULL                   |
+------------------------+

keyword

CONCAT