SQLite Forum

Type of the column
Login
Sure, that'll work, but that wasn't your question.

Also note that from, say a View, or any of a vast number of Query idiosyncrasies, a column that you would "expect" to be, say Integer, might have a value that is Text - but at least in that case SQLite will correctly return SQLITE_TEXT for that column type, but that says very little about what the original data/table/column type was, and more about what that value can be regarded as in its current form.

ALSO note - this may change from row to row. On one row column 3 might be an integer, on the next row it might be something else.

So given those givens, sure your proposed code will work (and I would even say is how it was intended to work) but it still makes the question about it being Int64 or Int32 moot. If it says INTEGER, and you do not know or do not control the range of values that go in there, best use a big enough box - i.e. Int64.