SQL数据库 "TRUNCATE TABLE" "DELETE FROM TABLE" 的区别

时间:2022-09-16 11:17:45

1. "TRUNCATE TABLE","DELETE FROM TABLE" 的区别

        两者的用法:

                       truncate table 表名

                       delete from 表名

      两者的区别:

                       truncate table 表名—>删除表的速度要比"delete from 表名"的方法快,删除数据后不能恢复,而"delete from 表名"删除数据后

                                                             可以恢复.