27 Jun 2016 2:08 AM #1
What is a key difference between Truncate and Delete?
pls tell me about this things
thanks in advance
28 Jun 2016 11:30 PM #2
Truncate is used to delete table content and the action can not be rolled back, whereas Delete is used to delete one or more rows in the table and can be rolled back
TRUNCATE TABLE removes the data by deallocating the data pages used to store the table data and records only the page deallocations in the transaction log whereas the DELETE statement removes rows one at a time and records an entry in the transaction log for each deleted row
Truncate identify column is reset to its seed value if table contains any identity column.
Delete statement identity of column keep DELETE retain the identity
To use Truncate on a table you need at least ALTER permission on the table whereas to use Delete you need DELETE permission on the table.
Truncate uses the less transaction space than Delete statement. Delete uses the more transaction space than Truncate statement.
By dbspaceg in forum Sencha Architect 2.x: Help & DiscussionsReplies: 3Last Post: 20 Feb 2012, 7:02 PM
By markjlyon in forum Ext Designer: Help & DiscussionReplies: 1Last Post: 11 May 2010, 7:48 AM
By LisburnLad in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 27 Mar 2009, 2:28 PM
By marco76 in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 12 Jan 2009, 10:23 AM