[AccessD] How does SQL Server do updates

Stuart McLachlan stuart at lexacorp.com.pg
Mon Oct 8 20:03:49 CDT 2012


A couple of things that come to mind:

1. Transactions and Rollbacks.

2. It's possibly quicker  to create a new page with the new record rather than doing multiple 
inserts, some of which may change the position of subsequent columns on the existing page.

-- 
Stuart

On 8 Oct 2012 at 20:26, Mark Simms wrote:

> One question: WHY ?
> 
> > 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.
> 
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list