Concatenation
Concatenation is "the action of linking things together in a series" (Oxford English Dictionary). In computer programming terms, it refers to a function that links two or more text strings together into a single string. Databases and spreadsheets also use concatenation functions to merge data from separate fields and cells.
Most programming languages include several concatenation methods to combine strings. When used with text strings, the + operator often works, but special concatenation functions can provide developers with more control. For example, both of the following JavaScript samples join two variables, adding a space in between:
fullName = firstName+" "+lastName;
fullName = firstName.concat(" ", lastName);
While the + operator is most common, some languages use other operators. For example, Perl uses . to concatenate strings, while Visual Basic uses &.
Concatenation functions can also combine strings in database fields and spreadsheet cells. For example, if a customer information table in an SQL database keeps the first and last names in separate fields, you can use the CONCAT() function to select both and format them as a single string. Spreadsheet applications like Microsoft Excel can use the CONCATENATE() function to select the values of two referenced cells and display them as one joined value. For example, CONCATENATE(B2," ",C2) joins the contents of cells B2 and C2, with a space in between.