all groups > sql server programming > may 2007 >
You're in the

sql server programming

group:

How does UPDATE statement work?


How does UPDATE statement work? kdpo
5/10/2007 10:59:08 PM
sql server programming:
Could someone tell where I can find out if it's true that during
UPDFATE SQL Serve deletes data from table, and then inserts new one.

Thanks

-A
Re: How does UPDATE statement work? Tibor Karaszi
5/11/2007 12:00:00 AM
No that statement is not correct. SQL Server will in many cases do an "update in place".

However, an update *might* be performed physically as a delete followed by an insert. For instance
when the row doesn't fit the old page, or if you are modifying the key that you are clustering over.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/


[quoted text, click to view]

Re: How does UPDATE statement work? David Portas
5/11/2007 2:01:23 AM
[quoted text, click to view]

Replied in microsoft.public.sqlserver.server
Please do not multi-post.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Re: How does UPDATE statement work? kdpo
5/11/2007 12:54:14 PM
Thank you.

-A
AddThis Social Bookmark Button