TIMESTAMP Two properties: Current_timestamp and on UPDATE current_timestamp
Http://blog.163.com/[email protected]/blog/static/2142429620122611356554/
Http://www.cnblogs.com/yjf512/archive/2012/11/02/2751058.html
Http://blog.sina.com.cn/s/blog_49a665e10100cb52.html
TIMESTAMP has two properties, namely Current_timestamp and on UPDATE Current_timestamp two, respectively, the following are used:
1.
Current_timestamp
When you want to perform an insert operation to the database, if you have a timestamp field property set to
Current_timestamp, the current system time is inserted regardless of whether the field has a set value
2.
On UPDATE Current_timestamp
When the update operation is performed, and the field has the on Update Current_timestamp property. The value of the field is updated to the time of the current update operation, regardless of whether the value has changed.
Automatic update time in MySQL Current_timestamp