> Testcase 6 is an integer, but is wrongly encoded as a string Nope, it's a string. [Datatypes in SQLite Version 3](https://www.sqlite.org/datatype3.html) You declared the "Value" column as VarChar, so the column has TEXT affinity. "A column with TEXT affinity stores all data using storage classes NULL, TEXT or BLOB. If numerical data is inserted into a column with TEXT affinity it is converted into text form before being stored." So you put in the integer 42, and it was stored in the database as the string '42'