I have a comments table, and rows have parent child relation, which means any comment can have children (responses) and any child itself can also have children (infinitely).
All rows are inside one table, and root row's parent_id
is 0.
Now I want to select all children (in any deep level) of a given parent_id
Any idea ?
DELETE FROM <your table> WHERE ID IN (<query>)
It works here: rextester.com/QMAQWI5780