I’m running the following SQLite workaround to add a primary key to a table that did not have one. I am getting a datatype mismatch on However, the fields have exactly the same type. Is it possible that his happens due to running the queries from DbBrowser for SQLite? Answer You have defined the column id of the table cities