Pradeep
What is the difference between TRUNCATE and DELETE commands?
Posted by Pradeep in Database | SQL Server on Aug 20, 2009
  • 0
  • 3
  • 4081
Do you know the answer for this question? Post it below.
Guest
Posted by f k on Sep 07, 2009
  • 1

delete is DML cmd so we hav to save after delete i.e. no autosave

truncate is DDL cmd so autosave

 

and truncate is faster than delete

bcoz delete cmd deletes rows one by one 

Posted by Priyadarshi Datta on Oct 30, 2009
  • 0

Delete  is DML command  used to delete rows from a table. A where clause can be used to remove some  rows.If no where clause is specified all rows will be removed.After delete operation you need to commit or Rollback the transaction to make the transaction permanent or to undo it.

On the other hand Truncate is a DDL Command remove all rows from the table.The operation cannot be rolled back.As such truncate is faster and does not use as much undo space as delete.

Posted by Juan Lago on Aug 23, 2009
  • 0

Truncate is faster than delete because the Delete command deletes the records row by row

and command truncate delete all at once


SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts
PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | ABOUT US | REPORT ABUSE
2013© C# Corner. All contents are copyright of their authors.