Drop and Truncate statement in SQL
What is difference between drop and truncate statement in SQL.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Aug 23, 2012, 4:29 AM EDT
TRUNCATE TABLE removes all rows from the table without logging the individual row deletions.
In contrast, DROP TABLE removes the entire table from the database.
Posted Aug 23, 2012, 7:41 AM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted Aug 23, 2012, 7:41 PM EDT
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 TABLE cannot activate a trigger because the operation does not log individual row deletions.
TRUNCATE TABLE table1;
The SQL DROP command is used to remove an object from the database. If you drop a table, all the rows in the table is deleted and the table structure is removed from the database.
DROP TABLE table1;
hope this will help you.