I have a table below. I want to write mySql Query that can return all the children against the parent Id. i.e. against 0 it should return (1,2,3,4) and against 1 it should return (3,4).
I am able to do this recursive call in SQL server using "with" clause, but i want to do this same thing in MySQL.
ParentId GroupID
0 | 0
0 | 1
0 | 2
1 | 3
3 | 4
Any help in this regard is highly appreciated.