标签: binary-tree parent-child
表定义:
id |名称| parent_id
数据:
1 | A | 0 2 | B | 1个 3 | C | 1个 4 | D | 2
我想计算表中每个ID的子代。