+ 1
What's the difference between DELETE and TRUNCATE
4 Respostas
+ 4
Truncate makes the table empty
Delete deletes the table
Edit: Delete deletes the specific record from table
+ 1
There is none, if you do not add a WHERE to your DELETE.
What Khartikey says is wrong.
+ 1
@1of3 I'm not talking about the syntax of DELETE
i.e. DELETE * FROM table
or DELETE FROM table WHERE name = value
I'm just talking about what they actually do.
My mistake is that I forgot to add "records" in 2 line
0
TRUNCATE TABLE (Transact-SQL)
Removes all rows from a table or specified partitions of 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.
From: https://tinyurl.com/y7phf3k8