Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

String concatenation in PostgreSQL

-- with functions
CONCAT(first_name,' ', last_name) AS full_name;

-- with string concatenation operator
SELECT first_name || ' ' || last_name AS full_name FROM customer;

-- String concatenation with a non-string input
SELECT customer_id || ': ' || first_name || ' ' || last_name AS full_name
FROM customer;
 
PREVIOUS NEXT
Tagged: #String #concatenation #PostgreSQL
ADD COMMENT
Topic
Name
9+8 =