Thanks, probably a foreign key would handle the example I gave.   I'm
really asking the general question what is possible within the CHECK
constraint?  Is it possible to base the check on a SELECT statement on
another table?
Pete

In the example, what I am trying to check is if the value of the column is

On Sun, Feb 19, 2012 at 9:00 AM, <sqlite-users-requ...@sqlite.org> wrote:

> Message: 2
> Date: Sun, 19 Feb 2012 01:29:52 +0100
> From: Petite Abeille <petite.abei...@gmail.com>
> To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
> Subject: Re: [sqlite] Help with CHECK Constraint
> Message-ID: <92bf7b2e-fe21-4cd3-a69c-44573b621...@gmail.com>
> Content-Type: text/plain; charset=us-ascii
>
>
> On Feb 19, 2012, at 1:24 AM, Pete wrote:
>
> > is it possible to
> > check if the value of Col1 exists in a column in a different table?
>
> Perhaps you are looking for foreign constraints:
>
> http://www.sqlite.org/foreignkeys.html
>



-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to