Columns do not have a fixed type and will accept any type. It's not a bug,
it's a feature:

http://sqlite.org/datatype3.html

On Wed, Aug 26, 2015 at 8:51 PM, Nicolas J?ger <jagernicolas at legtux.org>
wrote:

> Hi,
> I have a table built by:
>
> CREATE TABLE IF NOT EXISTS TAGS (ID INTEGER PRIMARY KEY AUTOINCREMENT,
> NAME TEXT NOT NULL, COUNT INTEGER NOT NULL);
>
> where `COUNT` is an `INTEGER`. I wanted to increment `COUNT` with that
> command :
>
> UPDATE TAGS SET COUNT = 'COUNT + 1' WHERE ID = '666';
>
> but when I looked where `ID` = 666, in the `COUNT` cell I read :
>
> COUNT + 1
>
> my error is obvious, but why sqlite doesn't return an error ? as I
> specified I want an integer, I should not be granted to set the value
> by a string. Or there is some reason for sqlite being permissive ?
>
>
> regards,
>
> Nicolas J.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

Reply via email to