On Wed, Dec 2, 2009 at 9:42 AM, Nick Shaw <nick.s...@citysync.co.uk> wrote:
> Ok, my mistake.  But would AUTOINCREMENT imply NOT NULL?


No.

> Could you have
> an AUTOINCREMENT field with post-updated null values?
>

Yes, unless you also specify NOT NULL


> Nick.
>
> -----Original Message-----
> From: sqlite-users-boun...@sqlite.org
> [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jay A. Kreibich
> Sent: 02 December 2009 15:02
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Possibly a bug in SQLite?
>
> 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
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to