This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10653|Reply: 0

[Source] Mysql CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP differentiated

[Copy link]
Posted on 9/1/2020 6:00:08 PM | | | |
Mysql CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP differentiated
When creating a time field
DEFAULT CURRENT_TIMESTAMP
This means that when inserting data, the default value of this field is the current time
ON UPDATE CURRENT_TIMESTAMP
This means that every time this data is updated, the field will be updated to the current time
These two operations are maintained by the MySQL database itself, so you can generate two fields, Creation Time and Update Time, based on this feature, without code to maintain









Previous:JVM parameters Options
Next:Azure DevOps 2020 (III) limits search (ES) memory footprint
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com