String concatenation combines two or more text values into one text value. The exact concatenation operator or function can vary between database systems.
Combining fields is common when creating display names, addresses, labels, and business-friendly report columns.
Combine first name and last name into a full name.
SELECT
FirstName || ' ' || LastName AS FullName
FROM Employees;
Concatenation is useful for customer names, employee names, addresses, labels, identifiers, and report formatting.
- Concatenation combines text values.
- Syntax varies between database systems.
- It can combine columns and text literals.
- Aliases can give concatenated results readable names.
- It is useful for report preparation.
What is string concatenation?
String concatenation combines multiple text values into a single text value.
Is concatenation syntax identical across databases?
No. Different database systems may use different operators or functions for concatenating strings.