Skip
Arish's avatar

142. Concatenating Strings


String Concatenation

Combine columns into one.

SQLite / MySQL

sql
1SELECT name || ' - ' || course AS student_info
2FROM students;

Using CONCAT

sql
1SELECT CONCAT(name, ' (', age, ')') AS display
2FROM students;