String manipulation can be useful to derive information from columns. We'll cover a couple of the common string functions here.
A common use case for string manipulation in SQL is concatenation of strings. In SQLite, this is written as
SELECT string1 || ' ' || string2;
For example, the bakeries table contains both city and state columns. In order to create a route for these columns, we use the
|| function to concatenate them as in the following query:
SELECT city || ' ' || state as location
String functions are again, very database specific, and it is best practice to consult documentation before proceeding.