The idea is that both id columns have allow nulls, but you would like to have an ID at least in one of them all the time.
This is how you do it:
ALTER TABLE [PTCTSS_FactorGroup] ADD
CONSTRAINT [CK_PTCTSS_FactorGroup_2cols] CHECK (((not([ContractSectionId] is null))) or ((not([CustomModuleId] is null))))
GO
Thanks 2 Cris ;)
No comments:
Post a Comment