[sqlite] Caveat in parsing create table statement

2011-05-13 Thread Jean-Christophe Deschamps
Dear list, Is there a way to make SQLite accept this kind of constraint: CREATE TABLE tab ( id INTEGER NOT NULL, data INTEGER, CHECK(data = 0 or not exists (select 1 from tab where id = data))); This toy exemple doesn't mean much as it is and the actual situation is a bit more

Re: [sqlite] Caveat in parsing create table statement

2011-05-13 Thread Samuel Adam
On Fri, 13 May 2011 12:06:23 -0400, Jean-Christophe Deschamps j...@antichoc.net wrote: Dear list, Is there a way to make SQLite accept this kind of constraint: CREATE TABLE tab ( id INTEGER NOT NULL, data INTEGER, CHECK(data = 0 or not exists (select 1 from tab where id =