Skip to main content
Version: Latest-3.2

concat

Description

This function combines multiple strings. If any of the parameter value is NULL, it will return NULL.

Syntax

VARCHAR concat(VARCHAR,...)

Examples

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