Actually, it is documented, on the CREATE TABLE page, near the bottom, in
the section titled "ROWIDs and the INTEGER PRIMARY KEY".  Not that this is
an exactly obvious place to look for it...

Best regards,

Peter

> -----Original Message-----
> From: [email protected] [mailto:sqlite-users-
> [email protected]] On Behalf Of Yang Zhang
> Sent: Friday, November 18, 2011 6:30 PM
> To: [email protected]
> Subject: [sqlite] Is this a bug? Can't tell from docs....
> 
> I just got bit by some peculiar behavior in sqlite where
> 
>  id int primary key
> is different from:
>  id integer primary key
> In particular, sqlite will generate values for the latter but not the
> former:
> sqlite> create table a (a integer primary key, b integer);sqlite>
> insert into a (b) values (0);sqlite> select * from a;1|0sqlite> create
> table b (a int primary key, b integer);sqlite> insert into b (b)
> values (0);sqlite> select * from b;|0
> I couldn't find in http://www.sqlite.org/autoinc.html
> orhttp://www.sqlite.org/datatype3.html any mention of this
> peculiardistinguishing behavior.  Anyway, if this is intentional (as
> I'm guessing), I wouldn't have been able to tell from the docs -
> perhaps this would warrant special mention?  Just thought I'd bring
> this to your attention.
> --
> Yang Zhang
> http://yz.mit.edu/
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to