原文地址: https://blog.csdn.net/heatdeath/article/details/79833492

 `create_time` timestamp not null default current_timestamp comment '创建时间',

 `update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',

当执行update操作是,并且字段有ON UPDATE CURRENT_TIMESTAMP属性。则字段无论值有没有变化,它的值也会跟着更新为当前UPDATE操作时的时间。


参考资料:

1、timestamp的两个属性:CURRENT_TIMESTAMP 和ON UPDATE CURRENT_TIMESTAMP
https://blog.csdn.net/aitcax/article/details/41849591

最新文章

  1. android开发------第一个android程序
  2. Android UI基础之五大布局
  3. Permutations [LeetCode]
  4. 【转】代码编辑器(二)-SynEdit
  5. 算法导论(第三版) Exercises4.2(求最大和子数组的算法优化过程)
  6. sqlserver2005仅当使用了列的列表,并且 IDENTITY_INSERT 为 ON 时,才能在表 'SendMealAddress'中为标识列指定显式值。
  7. 用tomcat搭建web服务器
  8. 为什么你的Excel很丑?
  9. Gradle 1.12用户指南翻译——第五十二章. Maven 插件
  10. JS操作iframe元素
  11. BZOJ4827 [Hnoi2017]礼物 多项式 FFT
  12. flink基础教程读书笔记
  13. 自学Linux命令行与Shell脚本之路
  14. nginx中间件
  15. CentOS6.2(64bit)下mysql5.6.16主从同步配置
  16. Python 简单入门指北(一)
  17. 使用promise 和 generator来管理工作流
  18. LuoguP3834 【模板】可持久化线段树 1(主席树)|| 离散化
  19. Codeforces 801B - Valued Keys
  20. TP - 001

热门文章

  1. ELK快速入门(三)logstash收集日志写入redis
  2. FRP 中文文档
  3. GitHub使用方法与三步教程
  4. 跟UI自动化测试有关的技术
  5. ios app ipv6 审核总结
  6. 27.SpringBoot和SpringMVC的区别
  7. leetcode 合并重叠区间变异 合并多个时间段 取并集
  8. linux学习11 Linux基础命令及命令历史
  9. java 参数传递、对象、封装
  10. CENTOS 7 下安装 REDIS 5.0.6 完整步骤