SQLite has several modes and settings that enable you to output query results as a comma-separated list.
For example, you can use the .separator
dot command to specify a comma as the separator. Or you could use the “quote” mode to format the output as string literals.
However, for the purposes of this article, I’m going to use csv
mode, which formats the results as a comma-separated list, as well as with double quotes around strings. Internal double quotes are double-quoted.