On Fri, Jan 23, 2009 at 12:51:07PM -0700, J. R. Westmoreland scratched on the 
wall:
> I have the following table creation statements and get an error. 
> 
> Functioning statement
> CREATE TABLE xxx (ID INTEGERPRIMARY KEY AUTOINCREMENT, .)

> If I remove the PRIMARY KEY" part of the statement, according to the docs on
> SQL that should be still a valid statement, I get an error.

  AUTOINCREMENT is only a valid modifier to INTEGER PRIMARY KEY.


> Brken statement:
> CREATE TABLE zzz (ID INTEGER AUTOINCREMENT .);
> 
> But, if I change "AUTOINCREMENT  "AUTO_INCREMENT" it works

  Yes, but it doesn't mean anything.  You've defined a user-type of
  "INTEGER AUTO_INCREMENT", which is about as meaningful to SQLite
  as "INTEGER PINEAPPLE" (also valid).



  http://sqlite.org/autoinc.html

  Also, see the syntax diagram here:

  http://sqlite.org/syntaxdiagrams.html#column-constraint



   -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

Reply via email to