update A set a.字段 = 值 from A
join B on a... = b...
where b.字段 ...

解决方案 »

  1.   

    update a set 列=b.列 where a.m=b.m
      

  2.   

    update 表A set 字段=xx
    from 表A inner join 表b on a.M=b.M
    where b.字段=xx
      

  3.   

    update [aa] set I=0 
    from [aa] a inner join [bb] b on a.M=b.M 
    where b.I=0 and a.R in (一个列)这样写,不更新为什么呀!
      

  4.   

    一列是a表的一组Id. a表只更新Id在这个列里,而且满足b表的条件的记录.
      

  5.   

    --应该是你的问题,你看下面我的测试,是正确的.declare @aa table(i int,m int,r int)
    insert into @aa
    select 1,1,1
    union all select 2,2,2
    union all select 3,3,3
    union all select 4,4,4declare @bb table(i int,m int)
    insert into @bb
    select 1,1
    union all select 0,3
    union all select 3,33
    union all select 0,2update @aa set I=0 
    from @aa a inner join @bb b on a.M=b.M 
    where b.I=0 and a.R in (1,3)select * from @aa