DECLARE @AFFECT INT declare @t table(name nvarchar(20),qy nvarchar(20),je int)insert into @t select N'产品一',N'北京',500union all select N'产品一',N'上海',300union all select N'产品二',N'北京',600union all select N'产品三',N'上海',1000union all select N'产品三',N'北京',8008…