create or replace procedure UP_AAA ( PSRLN_LIST VARCHAR2 ) is begin update aaa set try_count=try_count-1 where srln in (PSRLN_LIST); Commit; end UP_AAA; PSRLN_LIST的格式是'111','222','333' 可是调试发现,不能更新,这是为什么?有什么好的解决方法吗
create or replace procedure UP_AAA
(
PSRLN_LIST VARCHAR2
)
is
begin
execute immediate 'update aaa set try_count=try_count-1 where srln in ('||PSRLN_LIST||')';
Commit;
end UP_AAA;
--------------------------------------
这个方法存在sql 注入的危险