Problem Description: Error 1067 occurred while MySQL was importing data.
1 first find the line to be faulted: CREATE TABLE ' Fct_sales ' (
' UpdateTime ' datetime not NULL DEFAULT current_timestamp COMMENT ' update Time ') Engine=innodb DEFAULT Charset=utf8;
2 Searching for datetime and CURRENT_TIMESTAMP usage
3 Modify Datetime--timestamp or delete default Current_timestamp
4 successful
Cause: datetime date function, save date only. It is appropriate to record the original creation time of the data, because no matter how you change the value of the other fields in the record, the value of the DateTime field does not change unless you manually change it.
Timestamp timestamp to record the last modified time. You can set the TIMESTAMP not to update automatically, by setting the default Current_timestamp can be implemented.
The timestamp type is appropriate for recording the last modification time of the data, because the value of the timestamp field is automatically updated as soon as you change the value of the other fields in the record. (if necessary, you can set timestamp not update automatically)
MySQL Import data error 1067 (42000) Invalid default value for ' Update '