yudisentosa / SBDProjectSchool

0 stars 0 forks source link

Table - extracurricular_teacher #26

Closed marcelinalinaa closed 3 years ago

marcelinalinaa commented 3 years ago

DROP TABLE IF EXISTS extracurricular_teacher; CREATE TABLE extracurricular_teacher( extracurricular_id VARCHAR(6) NOT NULL ,effective_date DATE NOT NULL ,teacher_id VARCHAR(4) NOT NULL ,PRIMARY KEY(extracurricular_id, effective_date) ,FOREIGN KEY (extracurricular_id) REFERENCES extracurricular(extracurricular_id) ,FOREIGN KEY (teacher_id) REFERENCES employee(employee_id) ); INSERT INTO extracurricular_teacher(extracurricular_id,effective_date,teacher_id) VALUES ('EXC001','2000-07-24','1001'); INSERT INTO extracurricular_teacher(extracurricular_id,effective_date,teacher_id) VALUES ('EXC002','2000-07-24','1003'); INSERT INTO extracurricular_teacher(extracurricular_id,effective_date,teacher_id) VALUES ('EXC003','2000-07-24','1001'); INSERT INTO extracurricular_teacher(extracurricular_id,effective_date,teacher_id) VALUES ('EXC004','2000-07-24','1008'); INSERT INTO extracurricular_teacher(extracurricular_id,effective_date,teacher_id) VALUES ('EXC005','2010-07-24','1005'); INSERT INTO extracurricular_teacher(extracurricular_id,effective_date,teacher_id) VALUES ('EXC001','2020-02-07','1003'); INSERT INTO extracurricular_teacher(extracurricular_id,effective_date,teacher_id) VALUES ('EXC005','2020-04-06','1012'); INSERT INTO extracurricular_teacher(extracurricular_id,effective_date,teacher_id) VALUES ('EXC001','2020-11-09','1001');