How can i get all child nodes from sql table? (MemberJoiners table on pict)
Table structure:
ParentID LeftChildID righChildID
Here is pict:
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Recursive queries work, as pointed out by @Sayem. However, I would suggest a little bit of a redesign to use a Modified Pre-order Traversal technique. Sounds fancy, but this article explains it well.
If you are read-heavy, then it is a really fast technique.