Re: Difference Between Truncate and Delete
From: me (jscott56_at_teranews.com)
Date: 08/01/04
- Next message: Hassan: "stored procedure to capture identity values"
- Previous message: me: "Re: Trigger"
- Next in thread: Kalen Delaney: "Re: Difference Between Truncate and Delete"
- Reply: Kalen Delaney: "Re: Difference Between Truncate and Delete"
- Reply: nib: "Re: Difference Between Truncate and Delete"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 1 Aug 2004 01:03:09 -0400
delete causes the rows to be deleted, as part of a transaction, and is
logged to the log file.
truncate resets the end of file pointer, effectively removing reference to
all the rows. No transaction log entry, and no opportunity to recover the
data from the log.
truncate will run much much faster on tables with many rows than will the
delete. Its nearly instantanious.
"Panks" <agarwalp@eeism.com> wrote in message
news:OotXT97aEHA.1840@TK2MSFTNGP11.phx.gbl...
> What is the difference between Truncate and delete Statements
>
> Eg
>
> DELETE from table1 -- deletes all the rows , so does TRUNCATE table
table1
>
>
- Next message: Hassan: "stored procedure to capture identity values"
- Previous message: me: "Re: Trigger"
- Next in thread: Kalen Delaney: "Re: Difference Between Truncate and Delete"
- Reply: Kalen Delaney: "Re: Difference Between Truncate and Delete"
- Reply: nib: "Re: Difference Between Truncate and Delete"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|