t-sql清空表數據的兩種方法示例(truncate and delete)。本站提示廣大學習愛好者:(t-sql清空表數據的兩種方法示例(truncate and delete))文章只能為提供參考,不一定能成為您想要的結果。以下是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快,並且釋放日記所占資本,不記載因為刪除行的影響所發生的日記。