SQLite Forum

Potential bug? = comparison on columns defined with no type
Intended behavior.  '44' is text and 44 is a number.  They are not equal.

    SELECT '44'==44;

The above returns false.

If you give an affinity to the column (either text or integer) then the
constant will be coerced into the correct type and it will work more like
you expect.  But because no type was specified for the "country_id" column,
no type coercion occurs.  See the whole
[Datatypes][1] documentation page, and especially the 
"[Type Conversions Prior To Comparison][2]" section.

Bottom line:  If you give datatypes to your table columns, SQLite works
just like PostgreSQL and other "traditionally typed" RDBMSes.  The extra
rules for type affinity only really come into play when you have typeless
columns or start mixing datatypes in ways that traditional RDBMSes do not

[1]: https://www.sqlite.org/datatype3.html
[2]: https://www.sqlite.org/datatype3.html#type_conversions_prior_to_comparison