解决:ERROR 1067 (42000): Invalid default value for 'login_time'

 

When the operation appears as shown in the data table of FIG error

Cause of the problem is that the default timestamp value is not correct, the solution to these questions is: modify the default value is the current value.

sql language code:

  Alter table user modify login_time timestamp Default CURRENT_TIMESTAMP NOT NULL;

After modifying the normal operation can, additions and deletions to the data table is operated. I hope this helpful to you, welcome message exchange.

Guess you like

Origin www.cnblogs.com/blogs-jch/p/11220818.html