>Hi,
>
>I am running again into the problem with setting up a Foreign Key constraint (very frustrating). Here is the example:
>
>Table 1. VENDORS
> This table has unique field VENDOR_ID
>
>Table 2. PRODUCTS
> This table has field VENDOR_ID. I want to set up constraint as following:
>
>
>ALTER TABLE [dbo].[products] WITH CHECK ADD CONSTRAINT [FK_products_vendor] FOREIGN KEY([vendor_id])
>REFERENCES [dbo].[vendors] ([vendor_id])
>ON UPDATE CASCADE
>
>
>I get message:
>
>
>Introducing FOREIGN KEY <name> may cause cycles or multiple cascade paths. Specify ON UPDATE NO ACTION
>
>
>But if I specify ON UPDATE NO ACTION what good is this constraint? I don't see a problem of the multiple cascade paths here. What am I missing? How do you get around this issue with SQL Server?
Does vendor or products table already have another constraint with CASCADE enabled?
If it's not broken, fix it until it is.
My Blog