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)
时间: 2024-12-28 00:49:39
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)