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.

猜你喜欢

转载自blog.csdn.net/xylz_yang/article/details/81703412