CONCAT()

Overview

Concatenates and returns the given string arguments.

USAGE

CONCAT(string[, string] ...)

Argument Name

Description

string

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_WS() with an empty separator.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

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                     |
+---------------------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES