update a set a.b=b.b
 from table a,table b
where a.A=b.A and a.C=b.C and a.b='-'

解决方案 »

  1.   

    update table1 set b=aa.b
    from (select distinct c,b from table1) aa
    where table1.c=aa.c and table1.b='-'
      

  2.   

    update table1 set b=aa.b
    from (select distinct c,b from table1 where b is not null) aa
    where table1.c=aa.c and table1.b is null
      

  3.   

    update table set b='b'+right(c,1) where b='-'
      

  4.   

    update table set b='b'+right(c,1) where b='-'
      

  5.   

    update TAB set b=A.b 
    from (select a,('b'+substring(c,2,(len(c)-1))) b,c from tab) A
    where tab.a=A.a and tab.b is null
    这个语句是以字段a为关键字的
      

  6.   

    update b set b.b=a.b  from table,(select * from table where isNull(b,'')='') a join table b on a.c = b.c
      

  7.   

    update table1 set b=aa.b
    from (select distinct c,b from table1 where b is not null) aa
    where table1.c=aa.c and table1.b is null试了下这个是可以的,也学习