update statement multiple fields

  • Hi,

    I think the sql server process the following query right but I just wanted to make sure with you. If I have the update statement like this

    update table1

    set field1 = field1 + field2 + field3 - field4,

    field2 = 0,

    field3 = 0,

    field4 = 0;

    will it process the above statement in the right order? I mean will it update field1 with the

    (field1 + field2 + field3 - field4) before it resets field2, field3, field4?

    Thanks,

    sridhar.

  • field1 will be set to whatever (field1 + field2 + field3 - field4) equals when the UPDATE statement initially starts.

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply