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
| CREATE TABLE T_LOGEMENT_LOG
(LOG_ID INT NOT NULL PRIMARY KEY,
LOG_PROPRIO VARCHAR(16))
INSERT INTO T_LOGEMENT_LOG VALUES (1, 'DUPONT')
INSERT INTO T_LOGEMENT_LOG VALUES (2, 'DUFOUR')
INSERT INTO T_LOGEMENT_LOG VALUES (3, 'DUBOUT')
CREATE TABLE T_LOCATION_LOC
(LOC_ID INT NOT NULL PRIMARY KEY,
LOG_ID INT NOT NULL FOREIGN KEY REFERENCES T_LOGEMENT_LOG (LOG_ID),
LOC_DATE_DEBUT DATE NOT NULL,
LOC_DATE_FIN DATE NOT NULL)
INSERT INTO T_LOCATION_LOC VALUES (1, 2, '2007-08-03', '2007-08-05')
INSERT INTO T_LOCATION_LOC VALUES (2, 3, '2007-08-01', '2007-08-10')
CREATE TABLE T_CALENDRIER_CLD
(CLD_JOUR DATE NOT NULL PRIMARY KEY)
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-07-31')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-01')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-02')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-03')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-04')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-05')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-06')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-07')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-08')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-09')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-10')
INSERT INTO T_CALENDRIER_CLD VALUES ('2007-08-11') |
Partager