On 16 Feb 2012, at 6:26am, 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?
Yes. Defined, though not absolutely beyond doubt, in http://www.sqlite.org/lang_createtable.html By defining a field as INTEGER PRIMARY KEY AUTOINCREMENT your statement defines a value for each row added. Therefore SQLite never has to look at what the default value is. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

