How can I get all children from a parent row in the same table?
- by Johnny Freeman
Let's say I have a table called my_table that looks like this:
id | name | parent_id
1 | Row 1 | NULL
2 | Row 2 | NULL
3 | Row 3 | 1
4 | Row 4 | 1
5 | Row 5 | NULL
6 | Row 6 …