Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALTER TABLE [TableName]
- ADD CONSTRAINT [CK_TableName_ABC] CHECK (
- (case when A is not NULL then 1 else 0 end +
- case when B is not NULL then 1 else 0 end +
- case when C is not NULL then 1 else 0 end)<=1
- )
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement