I didn't even think AUTOINCREMENT applied.  Isn't any field identified, 
specifically, as "INTEGER PRIMARY KEY" using the row ID of the record?

> -----Original Message-----
> From: [email protected] [mailto:sqlite-users-
> [email protected]] On Behalf Of Ryan Johnson
> Sent: Thursday, February 16, 2012 8:37 AM
> To: [email protected]
> Subject: Re: [sqlite] Surprising INTEGER PRIMARY KEY Behavior
> 
> On 16/02/2012 1:26 AM, Pete wrote:
> > When creating a new table, I accidentally assigned a default value of
> > CURRENT_DATE to an INTEGER PRIMARY KEY AUTOINCREMENT field and was
> > surprised that I didn't get an error on CREATE TABLE as a result.  It
> > seems that the default is ignored as an INSERT with DEFAULT VALUES
> > assigned the correct value to the primary key field.  IS this
> expected behavior?
> My guess would be that autoincrement takes precedence over a normal
> default, so the default value is never requested?
> 
> Ryan
> 
> _______________________________________________
> 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