How SQLite Quote() Works

The SQLite quote() function allows you to escape a string so that it’s suitable for inclusion in an SQL statement.

Strings are surrounded by single-quotes with escapes on interior quotes.

BLOBs are encoded as hexadecimal literals.

Note that strings with embedded NUL characters cannot be represented as string literals in SQL. If you include strings with embedded NUL characters, the returned string literal is truncated prior to the first NUL.

Read more

How Replace() Works in SQLite

The SQLite replace() function enables us to replace one string (or part of a string) with another string.

The way it works is that you provide three arguments; the string that contains the substring to replace, the substring within that string to replace, and the string to replace it with.

Read more

How Group_Concat() Works in SQLite

SQLite has a group_concat() function that allows you to concatenate multiple results returned for a column into one.

This is sometimes referred to as “string aggregation”.

For example, when querying a database, instead of having each column’s value output in a new row, you can use group_concat() to have them output as a comma separated list.

Read more