Oracle复制某一个字段 批量修改(我们可以在插入的时候修改)

--删除 aa_client_id<>660
delete from b_business_type a1 where a1.aa_client_id <> 660;


 

--复制 aa_client_id=660的,并且把复制后的 aa_client_iD修改成360
insert into b_business_type
  (id,
   aa_client_id,
   aa_org_id,
   create_by,
   create_date,
   update_by,
   update_date,
   isactive,
   entitytype,
   status,
   code,
   name,
   shortname,
   eng_name,
   b_business_type_id,
   b_business_type_id_top,
   up_rate,
   member_rate,
   aa_headquarter_id,
   formkey,
   formview,
   b_business_id)
  select b_business_type_seq.nextval,
         360 aa_client_id, --360
         1440 aa_org_id, --1440
         1461 create_by,
         a1.create_date,
         1461 update_by,
         a1.update_date,
         a1.isactive,
         a1.entitytype,
         a1.status,
         a1.code,
         a1.name,
         a1.shortname,
         a1.eng_name,
         a1.b_business_type_id,
         a1.b_business_type_id_top,
         a1.up_rate,
         a1.member_rate,
         a1.aa_headquarter_id,
         a1.formkey,
         a1.formview,
         b_business_id
    from b_business_type a1
   where a1.aa_client_id = 660

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值