Apache Doris 中文技术论坛
Questions Tags Users Badges

【已解决】主键模型,on update 用insert 更新数据 可以数据没有变化的时候 不更新 时间戳么?

Asked May 23, 2024 Modified May 27, 2024
Viewed 56
2.1

如题 表里面有个

`date_updated` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',

在insert 部分字段做更新的时候 数据没有实际变化 这个字段的值 也会发生变化

edited May 27, 2024
yalamountain24
asked May 23, 2024
1 Answers

这个目前不行,因为数据虽然是相同的,没有变更,在insert时候也相当于是做了部分列更新,除非带上这个 date_updated 字段的值。

edited May 24, 2024
阿渊@SelectDB (没回帖直接加我主页微信)9350
answered May 24, 2024
Related Questions
AUTO LIST PARTITION 分区名长度为何限制 50?能否配置放宽/取消?
doris2.1.11重复建表报错内容异常,不会提示表已经存在
1 answers
我们通过hive catalog外表同步数据,有时候hive表会很大导致内存占满了会杀掉其他任务,限制内存又会导致同步任务失败,有什么方法可以稳定一下呢,同步效率慢一点什么的也没问题
1 answers
doris be启动报错
2 answers
使用docker-compose配置doris FE启动成功 但BE启动失败
1 answers
Doris的json解析问题
1 answers

Terms of service Privacy policy

Powered by Answer - the open-source software that powers Q&A communities.
Made with love © 2026 Apache Doris 中文技术论坛.