表的自引用有什么用处啊,可以举例说明一下么 谢谢
2 回答

慕田峪9158850
TA贡献1794条经验 获得超7个赞
table Person (
ID int primary key,
Name nvarchar(30) not null,
FatherID int null,
MotherID int null
);
这个就是自引用,表本身通过外键引用同一张表,这里FatherID和MotherID都通过外键引用Person
添加回答
举报
0/150
提交
取消