1

Topic: update does not bark at an amount of changing lines on a line> 1

DECLARE @ir_tbl TABLE (role int;
cnt int);
insert into @ir_tbl (role, cnt) values (' 1 ', 0)
update i
set cnt = cnt+a
from @ir_tbl i
JOIN (select 3 a, 1 i union all select 4 a, 1 i) an on (i.role=a.i)
select * from @ir_tbl

for some reason thought that should
A certain uncertainty turns out
If at following performance the plan exchanges, and with it and row order in a subquery an also the result can exchange at the same data

2

Re: update does not bark at an amount of changing lines on a line> 1

Microsoft SQL Server 2012 (SP3-GDR) (KB3194721) - 11.0.6248.0 (X64)
Sep 23 2016 3:49:43 PM
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 9600:) (Hypervisor)

3

Re: update does not bark at an amount of changing lines on a line> 1

andreymx wrote:

for some reason thought that should

should not. It is documented.
If want to receive in that case an error -  merge.

4

Re: update does not bark at an amount of changing lines on a line> 1

invm wrote:

it is passed...
Should not. It is documented.
If want to receive in that case an error -  merge.

I will try, thanks, absolutely from a head took off