用存储过程批量更新出错:
create or replace procedure pro1
(
strid in varchar2--
)
as
begin
update table1 set table1 .性别=‘男’where table1.id in (strid );
。。。
strid =“'11','121','13'”的形式传入,但到update后报错了,
单独执行update table1 set table1 .性别=‘男’where table1.id in ('11','121','13') 没问题
待受教
------解决方法--------------------------------------------------------
id是数值型的字段吧
create or replace procedure pro1
(
strid in varchar2--
)
as
begin
execute immediate 'update table1 set table1 .性别=''男'' where table1.id in ('||strid ||')';
。。。