MYSQL 清除表中数据

80 阅读1分钟

注意:不是删表

truncate table 表名;
delete from 表名;

区别:

delete 是一行一行删除;truncate 删除更快,是因为相当于保留原表结构,重新创建了表。