CREATE TABLE T1 ( ID1 INT, ID2 INT, PRIMARY KEY (ID1, ID2));
CREATE TABLE T2 ( ID2 INT, ID3 INT, PRIMARY KEY (ID2, ID3));
CREATE TABLE T3 ( ID3 INT, ID4 INT, PRIMARY KEY (ID3, ID4));
INSERT INTO T1(ID1, ID2) VALUES( 1, 11);
INSERT INTO T1(ID1, ID2) VALUES( 2, 21);
INSERT INTO T2(ID2, ID3) VALUES( 11, 111);
INSERT INTO T2(ID2, ID3) VALUES( 11, 112);
INSERT INTO T2(ID2, ID3) VALUES( 21, 211);
INSERT INTO T2(ID2, ID3) VALUES( 21, 212);
INSERT INTO T3(ID3, ID4) VALUES( 111, 1111);
INSERT INTO T3(ID3, ID4) VALUES( 111, 1112);
INSERT INTO T3(ID3, ID4) VALUES( 112, 1121);
INSERT INTO T3(ID3, ID4) VALUES( 112, 1122);
INSERT INTO T3(ID3, ID4) VALUES( 211, 2111);
INSERT INTO T3(ID3, ID4) VALUES( 211, 2112);
INSERT INTO T3(ID3, ID4) VALUES( 212, 2121);
INSERT INTO T3(ID3, ID4) VALUES( 212, 2122);
|