More efficient method for grabbing all child units
- by Hazior
I have a table in SQL that links to itself through parentID. I want to find the children and their children and so forth until I find all the child objects. I have a recursive function that does this but it seems very ineffective.
Is there a way to get sql to find all child objects? If so how?