title: ON UPDATE CASCADE with two columns in a single table in SQL Server
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/803836/introducing-foreign-key-constraint-c-name-on-table-t-name-may-cause-cycles-or">Introducing FOREIGN KEY constraint &#39;c_name&#39; on table &#39;t_name&#39; may cause cycles or multiple cascade paths</a>  </p>
  </blockquote>
  
  
  
  <p>I have a person table</p>
  
  <pre>
      person_id   name
      1           John
      2           Josh
  </pre>
  
  <p>I have a relationship table</p>
  
  <pre>
     relationship_id  person_a  person_b
     1                1         2
  </pre>
  
  <p>I am creating a foreign key relationship between relationship.person_a -> person.person_id with ON UPDATE CASCADE. This works fine. Now I try to create a foreign key relationship between relationship.person_a -> person.person_id with UPDATE CASCADE, but I get an error from SQL Server as follows:</p>
  
  <pre>
  SQL ALTER TABLE [dbo].[relationship] ADD CONSTRAINT [person_b_is_person] FOREIGN KEY ([person_b]) REFERENCES [dbo].[person] ([person_id]) ON UPDATE CASCADE:
  
  Introducing FOREIGN KEY constraint 'person_b_is_person' on table 'relationship' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
  </pre>
  
  <p>Why is this a problem?? Works on other databases like MySQL, Postgres. I want the ON UPDATE CASCADE so that if the person_id is changed, the relationships should be updated with the correct ids as well.</p>