如下有个表:
Id  Parent Child
0    a      b
1    b      c
2    c      d如果给定Child为d,要查询d的所有上级,怎么写sql语句呢?