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 difference between sql and sql server?
How to find the second highest salary of an employee?
what are the core components of SSRS?
Name some of the open source software that you can use in alternative to SSR?
How do users use Report Builder with SQL Server data sources?
What is normalization? Explain its different types?
What is the data tier application?
What are different types of subquery?
Explain multiserver query
How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.
How do you know if sql server is running on your local system?
what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
Can we perform backup restore operation on tempdb?
How to connect ms access to sql servers through odbc?
What are the differences between having and where clause.