SQL Server Exclusive Or in check constraint
It took a little searching to figure out how to do an “exclusive or” in a check constraint. Here you go, you’re welcome:
(IsNull([ColA],[ColB]) Is Not Null And ([ColA] Is Null Or [ColB] Is Null))
It took a little searching to figure out how to do an “exclusive or” in a check constraint. Here you go, you’re welcome:
(IsNull([ColA],[ColB]) Is Not Null And ([ColA] Is Null Or [ColB] Is Null))