skip to today's puzzle

|| joins two text values into one

Sticking text together is called concatenation, and || is the standard operator that does it. It joins values end to end and returns one string. Quoted text between them is added as written, which is how you slip in a space. Name the result with AS. SQL Server uses + or CONCAT() instead, and MySQL uses CONCAT().

A tiny example

In plain English: Show me each barista’s first and last name joined into one full name.

SELECT first_name || ' ' || last_name AS full_name
FROM baristas;

Query result

full_name
Ada Lovelace
Alan Turing

Each row is a first name and last name stuck together with a space between.

Related SQL lessons

Ready for a break?

A fresh, bite-sized SQL puzzle waits every morning. Tap tiles, see real results. No terminal, no setup, no timers.

Try today's free SQL puzzle