SQLite Forum

Proposed slightly-incompatible change to date-time functions
Login
> The point I am making is that because it does this, you can't tell if the original was inserted as an integer or as a real if the affinity of the column allows this transform. 

If the affinity is INTEGER, then you can insert 22 or 22.0 and you will always
get back 22.  If the affinity is REAL, you can insert 22 or 22.0 and you will
always get back 22.0.  But if the affinity is NUMERIC or BLOB
then you always get back
what you inserted.  If you insert 22 you get back 22, and if you insert 22.0 you
get back 22.0.