Getting dynamic childs for a parent in SQL
Posted
by
Islam
on Stack Overflow
See other posts from Stack Overflow
or by Islam
Published on 2013-06-30T16:11:12Z
Indexed on
2013/06/30
16:21 UTC
Read the original article
Hit count: 256
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,
© Stack Overflow or respective owner