日期:2014-05-16 浏览次数:20719 次
create table t1 (id number(5),name varchar(10),p_id number(5)); insert into t1 values (1,'name_1',null); insert into t1 values (2,'name_2',1); insert into t1 values (3,'name_3',null); insert into t1 values (4,'name_4',1); insert into t1 values (5,'name_5',3); insert into t1 values (6,'name_6',1); insert into t1 values (7,'name_7',3); insert into t1 values (8,'name_8',4); insert into t1 values (9,'name_9',2); insert into t1 values (10,'name_10',1);
id name p_id ------------------------------- 1 1 name_1 2 2 name_2 1 3 9 name_9 2 4 4 name_4 1 5 8 name_8 4 6 6 name_6 1 7 10 name_10 1 8 3 name_3 9 5 name_5 3 10 7 name_7 3