MS SQL “ON DELETE CASCADE” multiple foreign keys pointing to the same table?
问题 Howdy, I have a problem where i need a cascade on multiple foreign keys pointing to the same table.. [Insights] | ID | Title | | 1 | Monty Python | | 2 | Spamalot | [BroaderInsights_Insights] | broaderinsight_id | insight_id | | 1 | 2 | Basically when either record one or two in the insights table is deleted i need the relationship to also be deleted.. I've tried this: CREATE TABLE broader_insights_insights(id INT NOT NULL IDENTITY(1,1), broader_insight_id INT NOT NULL REFERENCES insights(id)