Differences among truncate, drop, and delete: 1. truncate and drop belong to DDL (DataDefinitionLanguage Data Definition Language). delete belongs to DML (DataManipulationLanguage data operation language) 2. From the perspective of table structure, truncate and delete only delete data, but do not delete the table structure drop delete data and table knot
Differences between truncate, drop, and delete 1. From the classification perspective, truncate and drop belong to DDL (Data Definition Language). delete belongs to DML (Data Manipulation Language Data operation Language) 2. From the perspective of table structure, truncate and delete only delete data, but do not delete the table structure drop delete data and table knot
Differences between truncate, drop, and delete
1. From the classification perspective
Truncate and drop are DDL (Data Definition Language)
Delete belongs to DML (Data Manipulation Language)
2. From the perspective of Table Structure
Truncate and delete only delete data, not delete table structure
Drop delete data and Table Structure
3. Security
Truncate and drop do not support rollback
Delete supported
4. Speed ()
The drop table Employees and truncate table Employees query overhead is 0%
The query overhead of delete from Employees is 95%.
Delete from Employees where dep_id = 3 the query overhead is 5%
From the perspective of execution plan query overhead, drop is equal to truncate, delete from tab where ...... Speed greater than delete from tab