On Feb 19, 2012, at 6:40 PM, Pete wrote:

>  I'm
> really asking the general question what is possible within the CHECK
> constraint?

An expression:

http://www.sqlite.org/lang_expr.html

>  Is it possible to base the check on a SELECT statement on
> another table?

Nope. No (sub)queries.

E.g.:


create table foo
(
  bar text check( exists( select 1 from baz where foobar = bar ) )
);

Error: subqueries prohibited in CHECK constraints

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

Reply via email to