Field analysis in mysql

1. The difference between field timestamp and field datetime

The format of datetime is: 2020-10-19 16:22:35. The byte is 8 bytes, the range is relatively large from 1001-9999, accurate to the second.
The format of timestamp is: 2020-10-19 16:22:35. The byte is 4 bytes, ranging from 1970-2038, accurate to the second. The default is NOT NULL. When adding or modifying, if no specific value is specified, the default modification or addition is: current time.

Guess you like

Origin blog.csdn.net/weixin_43983411/article/details/109962949