delete,truncate,drop区别
Posted 小jun学java
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了delete,truncate,drop区别相关的知识,希望对你有一定的参考价值。
delete,truncate,drop区别
1>delete属于DML(数据操纵语言)语言,truncate和drop属于DDL(数据定义语言)语言
2>执行速度 drop>truncate>delete
3>使用delete和truncate,只删除了数据,表结构还在,drop删光光。
4>delete带where,truncate不能带where
5>delete自增长不恢复到初始值,truncate自增长恢复到初始值,不触发delete触发器。
以上是关于delete,truncate,drop区别的主要内容,如果未能解决你的问题,请参考以下文章