title: MS SQL "ON DELETE CASCADE" multiple foreign keys pointing to the same table?
body: <p>I have a problem where i need a cascade on multiple foreign keys pointing to the same table..</p>
  
  <pre><code>[Insights]
  | ID | Title        |
  | 1  | Monty Python |
  | 2  | Spamalot     | 
  
  [BroaderInsights_Insights]
  | broaderinsight_id | insight_id |
  | 1                 | 2          |
  </code></pre>
  
  <p>Basically when either record one or two in the insights table is deleted i need the relationship to also be deleted..</p>
  
  <p>I've tried this:</p>
  
  <pre><code> CREATE TABLE broader_insights_insights(id INT NOT NULL IDENTITY(1,1),
     broader_insight_id INT NOT NULL REFERENCES insights(id) ON DELETE CASCADE,
     insight_id INT NOT NULL REFERENCES insights(id) ON DELETE CASCADE,
     PRIMARY KEY(id))
  Go
  </code></pre>
  
  <blockquote>
    <p>This results in the warning that the cascade "may cause cycles or
    multiple cascade path"</p>
  </blockquote>
  
  <p>So ive tried adding a cascade to just the insight_id and this results in:</p>
  
  <blockquote>
    <p>The DELETE statement conflicted with the REFERENCE constraint</p>
  </blockquote>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>
  
  <p>Daniel</p>