On 4/21/2014 6:04 AM, Richard Hipp wrote:
On Mon, Apr 21, 2014 at 6:18 AM, Neville Dastur wrote:
Google only showed up that UNIQUE needs to be added regardless of the
column being a PRIMARY KEY.

Google is wrong.  The UNIQUE is superfluous.  PRIMARY KEY always
implies UNIQUE.  Always.

PRIMARY KEY also is supposed to imply NOT NULL.  However, for historical
reasons, SQLite allows NULL in PRIMARY KEY columns if the column is not
INTEGER, not explicitly NOT NULL, and not in a WITHOUT ROWID table.

So you can't just go with SQL standards; you have to check the SQLite
documentation.  http://www.sqlite.org/lang_createtable.html

--
Andy Goth | <andrew.m.goth/at/gmail/dot/com>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to