select a.id fromuser_group a start with a.id = 979352 connect by prior a.id= a.parent_id
start with a.id = 979352表示从a.id =979352的记录开始查询,向叶子的方向递归,递归条件a.id=a.parent_id,当前记录的id等于子记录的parent_id
select a.id fromuser_group a start with a.id = 979352 connect by prior a.parent_id=a.id
从a.id = 979352子节点开始查询递归的记录 ,递归条件按照当前记录的a.parent_id等与父记录的a.id