CONCAT()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Concatenates and returns the given string arguments.
USAGE
CONCAT(string[, string] ...)
Argument Name | Description |
---|---|
| One or more strings to concatenate |
DETAILS
CONCAT()
is a string function that returns a string formed by concatenating all the input arguments.
Non-string arguments are converted into string arguments, when possible.
A NULL
is returned if any of the arguments is NULL
. To instead ignore NULL
arguments, consider using CONCAT_
EXAMPLES
SELECT CONCAT('H', 'el', 'lo th', 'ere!');
+------------------------------------+
| CONCAT('H', 'el', 'lo th', 'ere!') |
+------------------------------------+
| Hello there! |
+------------------------------------+
SELECT CONCAT('a', 'b', NULL, 'c');
+-----------------------------+
| CONCAT('a', 'b', NULL, 'c') |
+-----------------------------+
| NULL |
+-----------------------------+
SELECT CONCAT(HEX(1100), 1, 'A');
+---------------------------+
| CONCAT(HEX(1100), 1, 'A') |
+---------------------------+
| 44C1A |
+---------------------------+