首页 > 代码库 > Constraint where both columns cannot be null, but one can

Constraint where both columns cannot be null, but one can

ALTER TABLE TableA ADD CONSTRAINT CK_BothDepartsNotNull    CHECK (departA IS NOT NULL OR departB IS NOT NULL)

 

Constraint where both columns cannot be null, but one can