MSSQL: multiple cascade paths
Symptoms
You may receive the following error message when you create a FOREIGN KEY constraint: (microsoft report)
1
Server: Msg 1785, Level 16, State 1, Line 1 Introducing FOREIGN KEY constraint 'fk_two' on table 'table2' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. Server: Msg 1750, Level 16, State 1, Line 1 Could not create constraint. See previous errors.
For example, the table definition is like this:
1
2
3
4
5
6
7
8
Table t1:
Id: primaryKey
Table t2:
Id: primaryKey
parent: Fore