我是靠谱客的博主 淡然中心,这篇文章主要介绍t-sql清空表数据的两种方式示例(truncate and delete),现在分享给大家,希望可以做个参考。

复制代码 代码如下:

TRUNCATE TABLE (Transact-SQL)

Removes all rows from a table without logging the individual row deletions.

TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause;

however, TRUNCATE TABLE is faster and uses fewer system and transaction log resources.


两者的区别在于Truncate快,而且释放日志所占资源,不记录由于删除行的影响所产生的日志。

最后

以上就是淡然中心最近收集整理的关于t-sql清空表数据的两种方式示例(truncate and delete)的全部内容,更多相关t-sql清空表数据的两种方式示例(truncate内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(129)

评论列表共有 0 条评论

立即
投稿
返回
顶部