upadate b..表  set s1=t.s1 from a..表 AS t1,b..表 as t2 where t1.id=t2.id

解决方案 »

  1.   

    update b set sl=a.sl from 
    (select id,sl from A..a) a where b.id=a.id
      

  2.   

    用A库的a表中的所有记录的数量sl,更新B库的b表中的所有记录的数量sl看不是很明白~~
      

  3.   

    upadate b..表  set s1=t.s1 from a..表 AS t1,b..表 as t2 where t1.id=t2.id
    应该是:
    update b..表  set s1=t1.s1 from a..表 AS t1,b..表 as t2 where t1.id=t2.id
      

  4.   

    upadate b..表  set s1=t.s1 from a..表 AS t1,b..表 as t2 where t1.id=t2.id