题解 | #删除记录(三)#
删除记录(三)
http://www.nowcoder.com/practice/3abefc6fc73e4f219dad0ab66e6b1e3f
truncate table exam_record;
truncate table 在功能上,与不带where字句的delete语句相同;二者均删除表中的全部行,但truncate table 比delete速度更快,且使用的系统和事务日志资源少。 truncate 删除表中的所有行,但表的结构及其列,约束,索引等保持不变。新行标识所用的技术值重置为该列的种子。如果想保留标识计数值,轻盖拥delete 。如果要删除表定义及其数据,请使用drop table 语句。
