Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

in my situation, Error inserting a record into database table using MySQL workbench

CREATE TABLE FLIGHT
(
ID INT NOT NULL AUTO_INCREMENT,
FLIGHT_NO VARCHAR(20) NOT NULL,
OPERATING_AIRLINES VARCHAR(20) NOT NULL,
DEPARTURE_CITY VARCHAR(20) NOT NULL,
ARRIVAL_CITY VARCHAR(20) NOT NULL,
DATE_OF_DEPARTURE DATE NOT NULL,
ESTIMATED_DEPARTURE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
PRIMARY KEY(ID)
)

when i do:

insert into flight values
(1,'AA1','American Airlines','AUS','NYC', STR_TO_DATE('02-05-2018','%m-%d-%y'), '2018-02-05 03:14:07')

getting this error:

Error Code: 1292. Truncated incorrect date value: '02-05-2018' 0.000 sec

question from:https://stackoverflow.com/questions/65913610/in-my-situation-error-inserting-a-record-into-database-table-using-mysql-workbe

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...