On Mon, Mar 01, 2010 at 06:47:41PM +0300, ?????????????? ?????????????? scratched on the wall: > Hello! > > I need to check if parent of group is exist or not. > Parent stored in "parent" column and may be NULL or will be existing > "idgroup" column value.
> It does not works because subqueries prohibited in CHECK constraints. No, they're not. Also, it is highly unlikely the expression "parent == NULL" does what you want, given that it will *always* return NULL. Try "parent IS NOT NULL". > Somebody knows how to solve this problem? Foreign keys. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Our opponent is an alien starship packed with atomic bombs. We have a protractor." "I'll go home and see if I can scrounge up a ruler and a piece of string." --from Anathem by Neal Stephenson _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

