CONCAT combines specified values into one new value, appending them after each other.

If you are combining multiple components with the same characters, consider using JOIN.

If you are working on potentially unknown values, consider using CONCAT_OF_ANY.


p is Person
CONCAT(p.first_name, " ", p.last_name)

It is common practice to have two separate information fields for a name - one for the first and one for the last name. If, once these data are collected, you want to treat the full name as one combined piece of information, use CONCAT as in the example above. This would return a full name, e.g. "Jamie Fox".

The " ", with a space in between the quotation marks, adds a space between the first name and last name. If you want to include a middle name in the full name, the expression would look like this:

p is Person
CONCAT(p.first_name, " ", p.middle_name, " ", p.last_name)

This example would return a name like "Samuel Leroy Jackson".

If you prefer, CONCAT is also available by using the + operator between the elements, so the last example can also be written as:

p is Person
p.first_name + " " + p.middle_name + " " + p.last_name

Last updated