mysql - MySQL | Can not set UTC_TIMESTAMP after ON UPDATE
问题描述
Despite being able to set UTC_TIMESTAMP
for:
✔ ALTER TABLE post ADD created_at DATETIME DEFAULT (UTC_TIMESTAMP);
I haven't been able to set UTC_TIMESTAMP
for:
✘ ALTER TABLE post ADD updated_at DATETIME ON UPDATE (UTC_TIMESTAMP) AFTER created_at;
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(UTC_TIMESTAMP) AFTER created_at'
解决方案
推荐阅读
- ruby-on-rails - rabbitMQ(bunny gem) + sidekiq 在 heroku 中无法用于 ruby 应用程序
- html - 如何限制 CSS Grid 的行大小?
- assembly - masm32 sdk 中的链接错误
- mysql - 从两个表中选择姓氏名字和平均工资按姓氏降序排列
- ios - iOS 通知自定义操作(按钮)——无 GUI 时处理错误的最佳实践
- javascript - 当文件输入有值时更改标签 CSS
- jquery - jQuery 事件捕获停止传播
- android - Android LiveData 和实时更新
- primeng - 如何在 PrimeNg 的 p 日历中仅显示相关周?
- java - Spring HttpRequest 获取父 URL