webCOMAND

CONCAT()

Returns a string that results from concatenating one or more string arguments.

Prototype

int CONCAT(string str[, ...])

Parameters

  • str - Binary string, non-binary string or expression to evaluate to a string.
  • ... - Additional strings like the first argument to concat to the first and so on.

Return

Returns a string that results from concatenating one or more string arguments.  If all arguments are non-binary strings, the result is a non-binary string.  If the arguments include any binary strings, the result is a binary string.  A numeric argument is converted to its equivalent non-binary string form.  If any argument is NULL, NULL is returned.

Example

SELECT OID, CONCAT(Username, '<', Email, '>') AS FullEmail FROM User

Related

GROUP_CONCAT()