logo

How does UPDATE statement work?

kdpo posted on Friday, May 11, 2007 1:59 AM

Could someone tell where I can find out if it is true that during
UPDFATE SQL Serve deletes data from table, and then inserts new one.

Thanks

-A
reply


No that statement is not correct.

Tibor Karaszi posted on Friday, May 11, 2007 2:44 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/
reply

How does UPDATE statement work?

David Portas posted on Friday, May 11, 2007 5:01 AM

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
--
reply

Thank you.-A

kdpo posted on Friday, May 11, 2007 3:54 PM

Thank you.

-A
reply

 

Didn't Find The Answer You Were Looking For?

View SQL Server Programming Posts   Ask A New Question

EggHeadCafe has experts online right now that may know the answer to your question.  We pay them a bonus for answering as many questions as they can.  So, why not help them and yourself by becoming a member (free) and ask them your question right now?
Ask Question In Live Forum

If you have an OpenID and do not want to become a member of the EggHeadCafe forum, you can also sign on to Chat Chaos and post your question to our real time Silverlight chat application.
Ask Question In Chat Chaos

Previous SQL Server Programming conversation.

SQL Server Compact Edition    SQL Server Clients    SQL Server Clustering    SQL Server Connect    SQL Server Data Mining    SQL Server Data Warehouse    SQL Server DTS    SQL Server FullText    SQL Server Integration Services    SQL Server MSDE    SQL Server New Users    SQL Server OLAP    SQL Server Programming    SQL Server Replication    SQL Server Reporting Services    SQL Server Security    SQL Server    SQL Server Setup    SQL Server Tools    SQL Server XML   






  $1000 Contest    [)ia6l0 iii - $228  |  Jonathan VH - $161  |  Huggy Bear - $135  |  F Cali - $95  |  egg egg - $94  |  more Advertise  |  Privacy  |   (c) 2010