↧
Answer by Paul White for Complex Delete Cascade Including Self-Referencing Table
I think I have captured what you need in this basic design:db<>fiddleElementBaseSelf-fk for the hierarchy:CREATE TABLE dbo.ElementBase( id integer NOT NULL, parent_id integer NOT NULL,...
View ArticleComplex Delete Cascade Including Self-Referencing Table
Above is a diagram of my data structure. It represents a hierarchy which can contain three different types of "elements": "A"s, "B"s and "C"s. The relationships show the delete cascade behavior I would...
View Article