> Date: Wed, 11 Mar 2009 19:10:26 -0600
> From: Dennis Cote <r.dennis.c...@gmail.com>
> Subject: Re: [sqlite] SQLITE : Constraint question

[...]

> However, you can explicitly add the equivalent constraints to your table 
> definitions if you really want them. For example:
> 
>     create table t (
>         a varchar(15) check (length(a) <= 15),
>         b integer check (typeof(b) = 'integer')
>     );

That kind of CHECK constraint is actually a cunning way to enforce strict
affinity for a column, isn't it?

If so, I think that paragraph 6 (Other Affinity Modes) in
http://sqlite.org/datatype3.html should be updated or completed
accordingly. AFAIK there are no plans to implement the modes "strict
affinity" and "no affinity" that are mentioned there ... but maybe I missed
something?

BTW, is there a document that explains in more detail what operations the
CHECK constraint is capable of?

Best,
Wolfgang Enzinger
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to