Join a table to itself

后端 未结 7 1243
Happy的楠姐
Happy的楠姐 2021-01-26 00:15

this is one on my database tables template.

Id int PK
Title nvarchar(10) unique
ParentId int 

This is my question.Is there a problem if i creat

7条回答
  •  囚心锁ツ
    2021-01-26 01:00

    This is not a problem, as this is a relationship that's common in real life. If you do not have a parent (which happens at the top level), you need to keep this field "null", only then do update and delete propagation work properly.

提交回复
热议问题