我試着輸入值表中,我得到這個錯誤MySQL的不正確的日期時間值:09:40 AM」爲
"Incorrect datetime value: '09:40 AM' for column"
CREATE TABLE Class_Section (
crn char(5) NOT NULL Primary key,
dept_code char(3) NOT NULL,
course_num char(3) NOT NULL,
meeting_days varchar(6) NULL ,
start_time datetime NULL,
end_time varchar(8) NULL,
campus_code varchar(3) NOT NULL,
location varchar(6) NOT NULL,
faculty_id char(4) NOT NULL,
enrollment TINYINT NOT NULL,
capacity TINYINT NOT NULL,
);
INSERT INTO Class_Section (
CRN, dept_code, course_num, meeting_days, start_time, end_time, campus_code, location, faculty_id, enrollment, capacity
)
VALUES ('20761', 'PSY', '101', 'MW', '09:40 AM', '11:10 AM', 'WC','E-527', 'F002', 40, 40
);
謝謝
好,'09:40 AM'不是'datetime'。你不是很明顯嗎? – zerkms
你有'時間'而不是'datetime'作爲輸入。 –
MySQL或SQL服務器? – Alexander