What's the difference between DELETE TABLE and TRUNCATE
TABLE commands?
Answer Posted / skybeaver
"Delete TableName" is a logged transaction. Every row
affected by the delete will be written to the transaction
log. This is done for RECOVERY purposes, so that the
transaction may be rolled forward from a previous database
dump.
"Truncate TableName" is non-logged. It removes all rows
from the table and releases all allocated segments in the
database, all without logging anything. This is not
something a developer does, but rather is done by a DBA as
part of some sort of housekeeping.
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Explain database normalization?
How to use linked server?
How to insert and update data into a table with "insert" and "update" statements?
Why use cursor in sql server?
What is the downside of using udf?
Explain Geography datatype in SQL Server
Can you explain what are commit and rollback in sql?
what's the difference between a primary key and a unique key? : Sql server database administration
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?
what is new philosophy for database devises for sql server 7.0? : Sql server database administration
What is single-user mode?
What type of Index will get created after executing the above statement?
create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration
What is standby servers? Explain types of standby servers.
How many types of relations are there between dimension and measure group? : sql server analysis services, ssas