Returns a concatenated character string formed by concatenating two arguments.

Syntax

CONCAT ( char_expression , char_expression )

Notes

  • Both of the arguments must be of type CHARACTER or VARCHAR.
  • The result is of type VARCHAR.
  • If any of the argument expressions evaluate to NULL, the result is NULL.
  • The two char_expression expressions and the result of the CONCAT function can contain multi‑byte characters.

Example

This example illustrates the CONCAT function:

SELECT last_name, empno, salary 
    FROM customer 
    WHERE project = CONCAT('US',proj_nam);

Compatibility

ODBC compatible