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)

 

posted @ 2016-09-18 23:33  raindream  阅读(153)  评论(0编辑  收藏  举报