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, <[email protected]> wrote:

> Message: 2
> Date: Sun, 19 Feb 2012 01:29:52 +0100
> From: Petite Abeille <[email protected]>
> To: General Discussion of SQLite Database <[email protected]>
> Subject: Re: [sqlite] Help with CHECK Constraint
> Message-ID: <[email protected]>
> 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
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to