CREATE TABLE facility_conditions(
f_report_id VARCHAR(8) NOT NULL PRIMARY KEY
,facility_id VARCHAR(6) NOT NULL
,facility_condition VARCHAR(8) NOT NULL
,date DATE NOT NULL
,note VARCHAR(34) NOT NULL
);
CREATE TABLE mytable(
f_report_id VARCHAR(8) NOT NULL PRIMARY KEY
,facility_id VARCHAR(6) NOT NULL
,facility_condition VARCHAR(5) NOT NULL
,date DATE NOT NULL
,note VARCHAR(22) NOT NULL
);
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC001','FAC001','Baik','2021-08-01','-');
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC002','FAC002','Buruk','2021-08-01','ada 1 bola yang hilang');
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC003','FAC003','Baik','2021-08-01','-');
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC004','FAC004','Baik','2021-08-01','-');
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC005','FAC005','Baik','2021-08-01','-');
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC006','FAC006','Baik','2021-08-01','-');
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC007','FAC007','Baik','2021-08-01','-');
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC008','FAC008','Baik','2021-08-01','-');
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC009','FAC009','Baik','2021-08-01','-');
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC010','FAC010','Baik','2021-08-01','-');
INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC011','FAC011','Baik','2021-08-01','-');
CREATE TABLE facility_conditions( f_report_id VARCHAR(8) NOT NULL PRIMARY KEY ,facility_id VARCHAR(6) NOT NULL ,facility_condition VARCHAR(8) NOT NULL ,date DATE NOT NULL ,note VARCHAR(34) NOT NULL ); CREATE TABLE mytable( f_report_id VARCHAR(8) NOT NULL PRIMARY KEY ,facility_id VARCHAR(6) NOT NULL ,facility_condition VARCHAR(5) NOT NULL ,date DATE NOT NULL ,note VARCHAR(22) NOT NULL ); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC001','FAC001','Baik','2021-08-01','-'); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC002','FAC002','Buruk','2021-08-01','ada 1 bola yang hilang'); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC003','FAC003','Baik','2021-08-01','-'); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC004','FAC004','Baik','2021-08-01','-'); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC005','FAC005','Baik','2021-08-01','-'); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC006','FAC006','Baik','2021-08-01','-'); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC007','FAC007','Baik','2021-08-01','-'); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC008','FAC008','Baik','2021-08-01','-'); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC009','FAC009','Baik','2021-08-01','-'); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC010','FAC010','Baik','2021-08-01','-'); INSERT INTO facility_conditions(f_report_id,facility_id,facility_condition,date,note) VALUES ('FREPC011','FAC011','Baik','2021-08-01','-');