SQL> select * from test 2 connect by id=parent 3 start with parent is null;ID NAME PARE SALARY ---- ------ ---- ---------- 0001 Mary 800道理上当然是讲不通的,可就这么怪啊 这是在我机器上的真实情况。附:test.txt(先插入根结点) insert into test values('0001','Mary','',800); insert into test values('0002','Kate','0001',730); insert into test values('0003','Luce','0001',720); insert into test values('0004','Linda','0002',640); insert into test values('0005','Wom','0002',650); insert into test values('0006','Hallen','0002',640); insert into test values('0007','John','0003',630);
2 connect by id=parent
3 start with parent is null;ID NAME PARE SALARY
---- ------ ---- ----------
0001 Mary 800道理上当然是讲不通的,可就这么怪啊
这是在我机器上的真实情况。附:test.txt(先插入根结点)
insert into test values('0001','Mary','',800);
insert into test values('0002','Kate','0001',730);
insert into test values('0003','Luce','0001',720);
insert into test values('0004','Linda','0002',640);
insert into test values('0005','Wom','0002',650);
insert into test values('0006','Hallen','0002',640);
insert into test values('0007','John','0003',630);