1. 程式人生 > >difference between truncate and delete

difference between truncate and delete

1. delete a data entry operation will be recored in the db log, and can be rollback by log. the related trigger could be triggered.

    truncate a entry operation will not be writed in log, and the data can not be rollback, don't trigger the related trigger if have.

2. there's no change on table storage and index when execute the delete operation

    the table storage and index will be freed after exec the truncate operation.