> > UPDATE work > > SET result = CASE > > WHEN in1 == 0 THEN 0 > > WHEN in2 == 0 THEN 0 > > WHEN in1 != in2 THEN 0 > > ELSE -1 > > END; > > I'll rephrase my question: > Is there a guarantee (maybe defined by SQL92-specs?) that in update statements > as the one above the rows are updated in table sort order?
No, because there usually is no inherent table sort order, unless you are using a clustered index. Even then, I don't believe there is any *guarantee* that the updates will happen in that order. You could, of course, use a cursor, retrieved in the order you want, then update the records one by one.