Getting dynamic childs for a parent in SQL
- by Islam
I have a table called Categories which contains category_Id and parent_category_Id, so each category can has a child and the child can has a child and so on (it is dynamic).
So if i have category A and category A has child B and child B has child C and child C has child D. I want to get all the child tree of A using SQL so when I give this query the id of A its result will be the ids of A's child which is B,C & D.....any ideas.
Thanks in regards,