Page 1 of 1

How does the below check constraint work?

PostPosted: Thu Jun 30, 2011 10:48 pm
by ctrevino
If I have a check constraint on field1 for table 1 that states the below:

(FIELD1 = 'XXX' and FIELD2 in (X1, X2, X3)

There is no check constraint on FIELD2

Does this mean that if I try to enter a value of X1 in FIELD2 without a value of FIELD2 that I will get an error?

Re: How does the below check constraint work?

PostPosted: Thu Jun 30, 2011 11:10 pm
by ctrevino
Oh I know that the first thought is to just test it. The problem is that this check constraint has been removed because it is too big and nothing can be added to it. I am working on a system to replace the edits that the check constraint previously did. :) So, I can't test it really.