I am trying to load data from excel sheet to the below table on MYSQL 5.6 on windows 8.1 and I am getting \'Incorrect datetime value:\' error.
Term date column is o
In MySQL, ''
(an empty string) is different from a null
. If you want a null
value, you should use an explicit null
:
INSERT INTO `mith`.`EMPLOYEE`
(`EMP_ID`, `EMP_NAME`, `SALARY`, `START_DATE`, `TERM_DATE`)
VALUES ('26', 'Will Banker', '90000', '00:00.0', null)
I managed to solve a similar problem using the commands:
mysql> set session sql_mode='';
and
mysql> set global sql_mode='';
in mysql prompt.
Try replacing the null values in Excel with 0000-00-00. I have not tried this with Excel, but it works for csv file. import