当前位置:网站首页>mysql中的 ON UPDATE CURRENT_TIMESTAMP
mysql中的 ON UPDATE CURRENT_TIMESTAMP
2022-06-24 06:39:00 【raoxiaoya】
Mysql中如果你希望由系统自动填充时间的话,可以将字段类型设置为timestamp,这样的话,在创建一条的记录的时候就会有时间;此时这条数据发生了变更,这个时间是不会变的,如果想让时间也能自动更新,那么需要设置为同步更新ON UPDATE CURRENT_TIMESTAMP,如果仅仅使用了update语句,但是各个字段的值没有变化,那么时间也不会更新。
`upd_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP
`upd_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
边栏推荐
- 网吧管理系统与数据库
- 35 year old crisis? It has become a synonym for programmers
- Do you know about Statistics?
- Station B collapsed. Let's talk to the injured programmers
- When the VPC main network card has multiple intranet IP addresses, the server cannot access the network internally, but the server can be accessed externally. How to solve this problem
- 解读AI机器人产业发展的顶层设计
- How to operate the little red book account: making good use of the theory of long tail words
- Page Jump and database connection of student management system
- I want to say "three no" to digital transformation
- How to build a website after having a domain name? Can you ask others to help register the domain name
猜你喜欢

基于三维GIS系统的智慧水库管理应用

华为云低时延技术的九大绝招

记录--关于JSP前台传参数到后台出现乱码的问题

About Stacked Generalization

缓存操作rockscache原理图

网吧管理系统与数据库

Internet cafe management system and database

Nine unique skills of Huawei cloud low latency Technology
![Command ‘[‘where‘, ‘cl‘]‘ returned non-zero exit status 1.](/img/2c/d04f5dfbacb62de9cf673359791aa9.png)
Command ‘[‘where‘, ‘cl‘]‘ returned non-zero exit status 1.

Rockscache schematic diagram of cache operation
随机推荐
DHCP server setup
How to build an app at low cost
Rockscache schematic diagram of cache operation
How to open a hidden file
Web address domain name IP query method, what is the use of domain name
Interpreting the new features of Appstore: Customizing product pages and a/b test tools
Easy car Interviewer: talk about MySQL memory structure, index, cluster and underlying principle!
Come on, it's not easy for big factories to do projects!
云上本地化运营,东非第一大电商平台Kilimall的出海经
CloudCompare&PCL 点云裁剪(基于裁剪盒)
Game website making tutorial and correct view of games
How to solve the problem that after Tencent cloud sets static DNS, restarting the machine becomes dynamic DNS acquisition
Printer connection mode
How to give full play to the advantages of Internet of things by edge computing intelligent gateway
Why the computer can't start
Station B collapsed. Let's talk to the injured programmers
The gadgets developed by freshmen are popular. Netizen: my food is good
WordPress pill applet build applet from zero to one [applet registration configuration]
Authoritative recognition! Tencent cloud data security Zhongtai was selected as the 2021 pioneer practice case
Analysis and treatment of easydss flash back caused by system time