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 command dbcc checkdb used for?
How can we check the sql server version?
What is the tcp/ip port on which sql server runs?
Which are the olap features?
What are cursors in ms sql server?
Who is the owner of a schema in ms sql server?
Explain how to send email from sql database?
What is trace flag in sql server?
what are the different types of replication you can set up in sql server? : Sql server database administration
What is a benefit of using an after insert trigger over using a before insert trigger?
What are the recovery models for a database?
Is sql server implemented as a service or an application? : Sql server database administration
What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas
Explain four layers of abstraction microsoft architectured?
What are subqueries in sql server?