📜  mysql 更新列默认值 CURRENT_TIMESTAMP 错误 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:11.362000             🧑  作者: Mango

代码示例1
# Best case you can do is drop the column and recreate it with the set timestamp;
ALTER TABLE `TABLE_NAME` DROP COLUMN `COLUMN_NAME`;
ALTER TABLE `TABLE_NAME` ADD COLUMN `COLUMN_NAME` TIMESTAMP DEFAULT CURRENT_TIMESTAMP;