1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| CREATE TABLE IF NOT EXISTS parent (
PARENT_ID int(11) NOT NULL AUTO_INCREMENT,
NFM_BG int(11) DEFAULT NULL,
NFM_BD int(11) DEFAULT NULL,
NFM_LIB varchar(16) DEFAULT NULL,
PRIMARY KEY (PARENT_ID)
)
CREATE TABLE IF NOT EXISTS enfant (
ID int(11) NOT NULL AUTO_INCREMENT,
PARENT_ID int(11) NOT NULL,
NFM_LIB varchar(16) DEFAULT NULL,
PRIMARY KEY (ID)
)
INSERT INTO parent (PARENT_ID, NFM_BG, NFM_BD, NFM_LIB) VALUES (1, 1, 4, 'Aérien')
INSERT INTO parent (PARENT_ID, NFM_BG, NFM_BD, NFM_LIB) VALUES (2, 2, 3, 'Avion')
INSERT INTO parent (PARENT_ID, NFM_BG, NFM_BD, NFM_LIB) VALUES (3, 5, 8, 'Terrestre')
INSERT INTO parent (PARENT_ID, NFM_BG, NFM_BD, NFM_LIB) VALUES (4, 6, 7, 'Moto')
INSERT INTO parent (PARENT_ID, NFM_BG, NFM_BD, NFM_LIB) VALUES (5, 9, 10, 'Marin')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (1, 1, 'Planeur')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (2, 1, 'Parachute')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (3, 1, 'Hélico')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (4, 1, 'Fusée')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (5, 1, 'ULM')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (6, 2, 'Militaire')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (7, 2, 'Tourisme')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (8, 2, 'Civil')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (9, 3, 'Vélo')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (10, 3, 'Voiture')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (11, 3, 'Camion')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (12, 4, 'Side-car')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (13, 4, 'Trail')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (14, 5, 'Planche à voile')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (15, 5, 'Paquebot')
INSERT INTO enfant (ID, PARENT_ID, NFM_LIB) VALUES (16, 5, 'Voilier') |
Partager