oracle批量平添修改,传List方式

oracle批量添加修改,传List方式


insert into  test1 (select  id ,name,
                      case iscar when '1' then '1,' when '0' then '' else '' end||
                      case isshuma  when '1' then '2' when '0' then '3' else '' end hcobject,
                      replace(replace(replace(object,',3',''),'3,',''),'3','') txinfo from people)

update a set grade = (select max(age) from b where b.name = a.name)

**********************************insert********************
create table test1 (id varchar2(40),name varchar2(40),hcobject varchar2(40),txinfo varchar2(40))
**********************************insert********************

select id, name, sex, iscar, isshuma, age, object from people;

insert into  test1 (select  id ,name,
                      case iscar when '1' then '1,' when '0' then '' else '' end||
                      case isshuma  when '1' then '2' when '0' then '3' else '' end hcobject,
                      replace(replace(replace(object,',3',''),'3,',''),'3','') txinfo from people)