復制代碼 代碼如下:
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快,而且釋放日志所占資源,不記錄由於刪除行的影響所產生的日志。