update gch_Card_Info set isInitial=1
where gch_Card_Info.customerID=gch_Customer_Info.customerID
 and gch_Customer_Info.serviceLocation='北京'
我要设置一张表里面的isInitial字段的值为1但条件是该表的customerID字段与gch_Customer_Info中的customerID匹配且gch_Customer_Info表的serviceLocation的字段要为'北京'怎么改?谢谢!

解决方案 »

  1.   

    update gch_Card_Info set isInitial=1 from gch_Customer_Info a,gch_Card_Info b where a.customerID=b.customerID and a.serviceLocation='北京'orupdate b set isInitial=1 from gch_Customer_Info a,gch_Card_Info b where a.customerID=b.customerID and a.serviceLocation='北京'两个都试一下,没有经过测试~
      

  2.   

    update gch_Card_Info set isInitial=1 from gch_card_info,gch_customer_info
    where gch_Card_Info.customerID=gch_Customer_Info.customerID
     and gch_Customer_Info.serviceLocation='北京'