On Fri, May 17, 2013 at 3:16 PM, Roman Fleysher < roman.fleys...@einstein.yu.edu> wrote:
> Dear SQLiters, > > I am using sqlite shell, I believe version 3.7.16.2. I created a table > with CHECK condition as: > > CREATE TABLE subject( > subjectID INTEGER PRIMARY KEY, > handedness TEXT CHECK (handedness='Left' OR handedness='Right' OR NULL) > I think you want to say "... OR handedness IS NULL" not just "... OR NULL". ); > > in hopes to be able to insert only "Right", "Left" or nothing "", i.e. > fail otherwise. But: > > INSERT INTO subject (subjectID,"qqq"); > > actually inserts qqq. Am I doing something wrong? I read manual that newer > versions of sqlite should enforce CHECKs. > > Thank you, > > Roman > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users