MySQL中delete from table_a和truncate table table_a有什么区别? [英] What's the difference between delete from table_a and truncate table table_a in MySQL?

查看:77
本文介绍了MySQL中delete from table_a和truncate table table_a有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

What's the difference between DELETE FROM table_a and TRUNCATE TABLE table_a in MySQL?

推荐答案

  • 截断速度更快
  • 截断重置自动增量
  • 截断不是事务安全的 - 它会自动提交
  • 删除不必删除所有行
  • 截断文档
    删除文档

    这篇关于MySQL中delete from table_a和truncate table table_a有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆