Detecting loops in parent child relationships

Pro-actively detecting loops in parent child relationships is a very important activity before storing parent child relationships in a dataset

12/12/20231 min read

Detecting loops in parent child relationships

SELECT a.parent, a.child

FROM table1 a

INNER JOIN table1 b ON (b.child=a.parent and a.child=b.parent)