gpt4 book ai didi

mysql - MySQL中的delete from table_a和truncate table table_a有什么区别?

转载 作者:行者123 更新时间:2023-11-29 01:09:30 25 4
gpt4 key购买 nike

MySQL 中 DELETE FROM table_aTRUNCATE TABLE table_a 有什么区别?

最佳答案

  • 截断要快得多
  • 截断重置自动增量
  • Truncate 不是事务安全的 - 它会自动提交
  • 删除不必删除所有行

Truncate Documentation
Delete Documentation

关于mysql - MySQL中的delete from table_a和truncate table table_a有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1796288/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com