> Is there a rationale for allowing such statements or is that an effect
> of the 'Lite' nature?  (Note: I'm not complaining, just asking.)

I believe that's an effect of the "typeless" design. As SQLite doesn't
have strict type names for columns it accepts pretty much anything for
that. So in your case it thinks that type of first column is "CHAR
COLLATE NOCASE" and for second "INTEGER DEFAULT 1". What do those type
names mean is up to you. :)


Pavel


On Thu, May 19, 2011 at 4:40 PM, Jean-Christophe Deschamps
<j...@antichoc.net> wrote:
> Anoher (silly) question about what SQLite considers valid input, again
> out of mere curiosity.
>
> A statement like:
>
> CREATE TABLE a (a CHAR COLLATE NOCASE COLLATE BINARY, b INTEGER DEFAULT
> 1 DEFAULT 2);
>
> doesn't cause any error: SQLite applies only the last constraint of
> each type, namely COLLATE BINARY and DEFAULT 2 in this case.
>
> Is there a rationale for allowing such statements or is that an effect
> of the 'Lite' nature?  (Note: I'm not complaining, just asking.)
>
> Is it OK to ignore all but the last constraint of each type when
> parsing that statement, just like SQLite currently does?
>
> _______________________________________________
> 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

Reply via email to