Drop and Truncate statement in SQL
What is difference between drop and truncate statement in SQL.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Aug 23, 2012, 11:41 PM
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.
Posted Aug 23, 2012, 11:41 AM
VulpesPosted Aug 23, 2012, 8:29 AM
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.