That's interesting.  Apparentely PRAGMA table_info() reports the declared
column type not the operational column type.

sqlite> CREATE TABLE test (id INTEGER PRIMARY KEY NOT NULL);
Run Time: real 0.454 user 0.000000 sys 0.000000
sqlite> PRAGMA table_info(test);
cid,name,type,notnull,dflt_value,pk
0,id,INTEGER,1,,1





On Sun, Jul 16, 2017 at 12:19 AM, gwenn <gwenn.k...@gmail.com> wrote:

> Hello,
> PRAGMA table_info reports that a rowid alias is nullable:
>
> sqlite> .headers on
> sqlite> CREATE TABLE test (id INTEGER PRIMARY KEY);
> sqlite> pragma table_info("test");
> cid|name|type|notnull|dflt_value|pk
> 0|id|INTEGER|0||1
> sqilte> --0|id|INTEGER|1||1 expected
> sqlite> INSERT INTO test (id) VALUES (NULL);
> sqlite> SELECT rowid, id FROM test;
> id|id
> 1|1
>
> Regards.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to