-- Create table
create table DG
(
ID NUMBER,
SUBID NUMBER
)
tablespace KELY
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64
minextents 1
maxextents unlimited
);
select *
from dg
start with id = 1
connect by prior id = subid;
--intersect --交集
--select * from dg connect by prior id = subid start with id = 4;
select *
from dg
start with ID = 4
connect by prior SUBID = ID;