根据数据判断,然后更新
比如,A   B2个表,都有aa字段   bb字段   cc字段,cc字段默认为0,判断一条数据aa=‘1111’   bb=‘2222’属于A表还是B表,然后更新属于该表的cc字段为1
------解决方案--------------------if exists(select aa from A where aa= '1111 ' and  bb= '2222 ') 
     update A set cc=1 where  aa= '1111 ' and  bb= '2222 ' 
 if exists(select aa from B where aa= '1111 ' and  bb= '2222 ') 
     update B set cc=1 where  aa= '1111 ' and  bb= '2222 '