[AccessD] How does SQL Server do updates

jwcolby jwcolby at colbyconsulting.com
Mon Oct 8 11:04:51 CDT 2012


Ahhh...

And that makes sense.  I have been checking index fragmentation after doing updates and it pretty 
much mangles some of the indexes.  Others not too bad.



John W. Colby
Colby Consulting

Reality is what refuses to go away
when you do not believe in it

On 10/8/2012 11:36 AM, Arthur Fuller wrote:
> John,
>
> SQL Server doesn't ever physically update a row, but instead does an insert
> and a delete. This can be verified by creating a trigger For Update, inside
> which you'll find the tables #inserted and #deleted. In #inserted you'll
> find some of the original row's columns, with new values for the columns
> you changed. Then SQL deletes the row(s) in #deleted, and inserts the
> "replacement" rows in #inserted.
>
> HTH,
> Arthur
>



More information about the AccessD mailing list