我有一个包含两列的表,Parent并且Child.
我需要获取与父记录关联的所有后代的列表。
Source Table
+----+-----------+
| Parent | Child |
+----+-----------+
| a | b |
| b | c |
| c | d |
| d | e |
| e | f |
| f | x |
+----+-----------+
Expected Result:
+----+-----------+
| Parent | Child |
+----+-----------+
| a | b | // As b is the child of a, all the descendants of b
| a | c | // are …Run Code Online (Sandbox Code Playgroud) recursive ×1