MySQL is not allowing ON UPDATE CURRENT_TIMESTAMP for a DATETIME field

后端 未结 7 1638
不知归路
不知归路 2021-02-12 23:18

I have seen a lot of related questions, but I cannot place my finger on this specific question:

I have a MySQL table with both a TIMESTAMP (for when the field was create

7条回答
  •  无人共我
    2021-02-13 00:13

    The TIMESTAMP and (as of MySQL 5.6.5) DATETIME data types offer automatic initialization and updating to the current date and time. For more information, see Section 11.3.5, “Automatic Initialization and Updating for TIMESTAMP and DATETIME”.

提交回复
热议问题