CONCAT(string1[,string2,...])

Description: Concatenates all strings together in the order specified and returns the resulting string.

Numeric arguments are converted to strings. Any NULL string causes a NULL to be returned.

Examples:

  • CONCAT('a','B','z') returns aBz.

  • CONCAT('a',5,7.5) returns a57.5.

  • CONCAT('a',NULL) returns NULL.

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.