Constraint where both columns cannot be null, but one can
Posted RainDream
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的主要内容,如果未能解决你的问题,请参考以下文章
Integrity constraint violation: 1052 Column 'status' in where clause is ambiguous