delete 和 truncate 的区别

delete from 表名;    /*不带where则删除整个表数据,在提交之前可以回滚*/

truncate table 表名;    /*直接清除表数据,不可回滚,效率比delete高*/

猜你喜欢

转载自www.cnblogs.com/yifanSJ/p/9166420.html