How to Concatenate Strings in Oracle
Last updated August 25, 2026 · By the SaturnSQL team
Use || to join strings, or CONCAT for two at a time. Oracle's quirk: NULL || 'x' returns 'x', not NULL as in most other databases.
SELECT first_name || ' ' || last_name AS full_name
FROM employees;CONCAT only takes two arguments
CONCAT(a, b) exists for ANSI compatibility but accepts exactly two arguments, so joining three or more strings means nesting calls. The || operator has no such limit and is what most Oracle code uses instead.
SELECT CONCAT(CONCAT(first_name, ' '), last_name) AS full_name
FROM employees;Oracle's most surprising behavior: 'Order #' || NULL || order_id produces 'Order #123', not NULL, because Oracle treats an empty string and NULL as the same value internally, and || simply skips a null operand. That's not universal, but it's not safe to assume elsewhere either: Postgres's || returns NULL for the whole expression if any operand is null, SQL Server's + operator does the same, and MySQL's || is logical OR unless PIPES_AS_CONCAT mode is enabled. Check the target database's actual behavior rather than assuming NULL propagates (or doesn't) when porting queries.
Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free