1、select decode(a.xh,'','0','1')||decode(b.xh,'','0','1') from A a left join B b on a.xh=b.xh where a.xh='" + xh + "'

查找在xh是否在A、B中如在在返回1,不在返回0。

2、update  A set  bh=(select bh from  B  where B.id=  A.id) where id in (select id from  B)

更新A 、编号在B中而且在A中

3、insert into A (id,bh) select id,bh from B where id not in(select id from  A

更新A、编号在B中而且不再A中

相关文章:

  • 2021-09-09
  • 2021-05-24
  • 2021-12-14
  • 2021-07-14
  • 2021-06-16
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2021-07-07
  • 2021-11-02
  • 2021-11-15
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
  • 2022-03-03
相关资源
相似解决方案