两个表 A BA字段:编号,年龄
B字段:编号,年龄当A. 编号=B.编号时用B 年龄替换A.年龄怎么写?

解决方案 »

  1.   

    update B set 年龄=A.年龄 from A,B where A.编号=B.编号
      

  2.   

    应该是这样吧!..
    update A set 年龄=b.年龄 from A,B where A.编号=B.编号
      

  3.   

    update A set 年龄=b.年龄 from A,B where A.编号=B.编号
      

  4.   

    sorry,搞错,更改一下
    update A set 年龄=b.年龄 from A,B where A.编号=B.编号
      

  5.   

    update A set 年龄=b.年龄 from A,B where A.编号=B.编号
      

  6.   

    update A set age = B.age from A,B where A.Number = B.Number
      

  7.   

    update A 
    set A.年龄=B.年龄
    from A,B
    where A. 编号=B.编号
      

  8.   

    update A set 年龄=b.年龄 from A,B where A.编号=B.编号