Skip to content
Justice Tech School

Joining Text

Use || in SQLite and PostgreSQL, CONCAT in MySQL, to join text. Combine with UPPER, LOWER and LENGTH.

Example
SELECT name || ' (' || country || ')' AS label, UPPER(name) AS up, LENGTH(name) AS len
FROM students LIMIT 3;

Result

label           | up    | len
Ada (Nigeria)   | ADA   | 3
Kofi (Ghana)    | KOFI  | 4
Amina (Nigeria) | AMINA | 5

Exercise

Text length.

(name)

Quiz Test

Which joins text in SQLite?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.