3 Ways to Backup an SQLite Database

When it comes to backing up your databases in SQLite, you have a few options as to how to go about it.

In particular, you can use one of the following methods:

  • Use the .backup command to back up a specified database
  • Use the .dump command to export the database to a .sql file
  • Use the .clone command to clone the database

Read more

How SQLite Char() Works

In SQLite, the char() function returns a string based on the unicode code points provided as arguments.

You can provide one or more arguments, each of which is a unicode code point. The function then returns a string based on those code points.

Read more

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