id path pid
1 /a 0
2 /b 1
3 /c 1
4 /d 2
5 /e 4
那么我想删除掉id为2的所有节点和子节点孙节点
delete from aa where id in (select id from aa start with id=2 connect by prior id=pid)
id path pid
1 /a 0
2 /b 1
3 /c 1
4 /d 2
5 /e 4
那么我想删除掉id为2的所有节点和子节点孙节点
delete from aa where id in (select id from aa start with id=2 connect by prior id=pid)
转载于:https://my.oschina.net/u/1410278/blog/516368