clh899 发表于 2016-11-12 10:42:39

DB2_SQL

CONNECT TO JSAMPLE;
CREATE TABLE ZYL.TREE ( ID INTEGERNOT NULLGENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, NO CACHE ) , PID INTEGER , ROOTID INTEGER , LEVELER INTEGER , TITLE VARCHAR (80) , ISLEAF INTEGER, CONSTRAINT PK PRIMARY KEY ( ID)) ;
CONNECT RESET;

insert into tree values (DEFAULT, 0, 1, 1, 'id:1 pid:0 root:1 isleaf:1 ruanjiangongcheng' , 1);
insert into tree values (DEFAULT, 1, 1, 1, 'id:2 pid:1 root:1 isleaf:1 jsj',1);
insert into tree values (DEFAULT, 2, 1, 1, 'id:3 pid:2 root:1 isleaf:0 kuaiji' ,   0);
insert into tree values (DEFAULT, 2, 1, 1, 'id:4 pid:2 root:1 isleaf:1 shujujiegou',   1);
insert into tree values (DEFAULT, 4, 1, 1, 'id:5 pid:4 root:1 isleaf:0 suanfa',0);
insert into tree values (DEFAULT, 1, 1, 1, 'id:6 pid:1 root:1 isleaf:1 shujuku',   1);
insert into tree values (DEFAULT, 6, 1, 1, 'id:7 pid:6 root:1 isleaf:0 java', 0);
insert into tree values (DEFAULT, 6, 1, 1, 'id:8 pid:6 root:1 isleaf:0 php',0);
insert into tree values (DEFAULT, 2, 1, 1, 'id:9 pid:2 root:1 isleaf:1 c++',1);
insert into tree values (DEFAULT, 9, 1, 1, 'id:10 pid:9 root:1 isleaf:0 asp.net' ,0);
insert into tree values (DEFAULT, 1, 1, 1, 'id:19 pid:1 root:1 isleaf:0 test' ,0);
insert into tree values (DEFAULT, 5, 1, 1,'id:20 pid:5 root:1 isleaf:0 c#' , 0);
页: [1]
查看完整版本: DB2_SQL