mysql新建字段时 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' 报错
天蓬老师
天蓬老师 2017-04-17 14:59:41
0
4
912
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(4)
巴扎黑

This default value is not allowed by default starting from 5.7. It is recommended to check the official website documentation.

洪涛

It is recommended to use int to save time

小葫芦

What is your timestamp field type?
ps: In addition, it was mentioned above that the int format is not optimal in all scenarios

大家讲道理

Timestamp supports a limited year range, but occupies 2 bytes. Datetime can support 0000 to 9999, but occupies 4 bytes

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template