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
What is the sql case statement used for? Explain with an example?
What are transactions in sql?
What is the difference between having clause and where clause in sql server?
How use inner join in sql server?
How to disable stored procedure sql server?
How to create an inline table-valued function?
What is resultset concur_updatable?
What is sql server used for?
How do I edit a procedure in sql server?
How raid can influence database performance?
Are semicolons required at the end of sql statements in sql server 2005?
What is optimization and its types?
what is a check constraint?
How do you create an execution plan?
What are the different types of sub-queries?