[dba-SQLServer] Enforcing a rule

jwcolby jwcolby at colbyconsulting.com
Sun Aug 28 17:40:51 CDT 2011

I have a table where the client is either a parent type (from a list of parent types) or a 
professional type (from a list of professional types).  I need to enforce that at least one of the 
fields is filled.  IOW both cannot be null, but either one can be null or both can be filled.

How do I do something like that?  I have never used database level constraints other than pk/fk so I 
do not know how to set something like this up.  Any detailed instructions or a pointer to a web page 
would be appreciated.


John W. Colby

More information about the dba-SQLServer mailing list