Need Help with a Trigger for preventing a circular reference on a table
We currently have a table that looks like this:
ChildId | ParentID
------------------
1 | NULL
2 | NULL
3 | 1
4 | 3
Can anyone help me come up with a constraint/trigger that would开发者_运维问答 prevent a circular reference from being inserted or updated into the table?
Thanks
You will need to create a trigger.
精彩评论