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
How to rebuild the master database?
What is the difference between clustered and a non-clustered index?
What is recompile sql server?
Explain what are page splits? : SQL Server Architecture
Explain ms sql server reporting services vs crystal reports?
Define cross join in sql server joins?
What is perspective, have you ever created perspective? : sql server analysis services, ssas
List the different normalization forms?
How to Update from select query in sql server?
What happens if null values are involved in string operations?
last function used in MS Access to convert sql what function will use in sql
How to concatenate two binary strings together?
Describe triggers features and limitations?
How to send a ssrs report from ssis?
how can u get last observation in an unknown dataset ?