On Wed, Dec 02, 2009 at 09:38:54AM -0000, Nick Shaw scratched on the wall: > You don't need to define the PRIMARY KEY as NOT NULL - it's implied.
Yes, you do. You shouldn't, but you do: http://sqlite.org/lang_createtable.html According to the SQL standard, PRIMARY KEY should imply NOT NULL. Unfortunately, due to a long-standing coding oversight, this is not the case in SQLite. SQLite allows NULL values in a PRIMARY KEY column. > The column constraint flow diagram in the documentation in fact doesn't > allow it: > http://www.sqlite.org/syntaxdiagrams.html#column-constraint The diagrams are for clear human readability, not to define the accepted language. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users