Hi,
I have a problem.
My problem is :
I have two tables reprezentoing a tree, first table representing nades,
and second representing links
first - ID, Name second- ID1, ID2,weight
--------------------- ----------------------
| 1 | name 1 | | 2 | 1 | 6.0 |
| 2 | name 2 | | 2 | 5 | 7.3 |
| 3 | name 3 | | 3 | 5 | 8.99 |
| 5 | name 5 |
I try define foreign keys but I get a error on defining second foreign key:
ID -> ID1 , on update, on delete
ID -> ID2 , on update, on delete
How I can define desired foreign keys.
Thanks for read :}
Adam Machanic - 28 Feb 2005 17:31 GMT
Unfortunately, you cannot define multiple cascading foreign keys; apparently
this can cause certain ambiguities when it comes time to cascade. One
possible solution is to enforce the cascade via INSTEAD OF triggers -- more
work, but I think it should be doable...

Signature
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
> Hi,
> I have a problem.
[quoted text clipped - 18 lines]
>
> Thanks for read :}