What is different between Truncate and deletion of a table?
| Truncate | Delete |
| Removes data by page by page | Removes data by row by row |
| Faster | Slower |
| Can’t be rolled back once done | Can be rolled back once before committing |
| Releases space when a table is truncated | Spaces won’t be released when rows are deleted |
| It is DDL | It is DML |
| This operation used to remove entire table data | This operation can be applied to remove some/full amount of data from table |
No comments:
Post a Comment