源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

t-sql清空表数据的两种方式示例(truncate and delete)

  • 时间:2020-01-03 14:51 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:t-sql清空表数据的两种方式示例(truncate and delete)
[u]复制代码[/u] 代码如下:
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快,而且释放日志所占资源,不记录由于删除行的影响所产生的日志。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部