这种情况参数如何传入呢? 比如我有个select语句需要传入参数p_type,假设p_type输入值为('222','3333')select * from t1 where substr(c1,1,4) in p_type.那p_type该如何写呢?谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果不用动态sql,可以吗?因为sql太长了。 create or replace procedure procedure_name( p_type varchar2, o_cursor sys_refcursor)asbegin open o_cursor for 'select * from t1 where substr(c1,1,4) in ('||p_type||')';exception when others then null;end; 使用动态sql与sql的长短没有任何关系了。 没有什么好办法,只有这一条路,动态sql。 就是懒,找个写好的动态sql套过去就行了,该3个'的3个,该两个的2个。你就套呗 oracle 11g express 使用方法 oracle 安装问题请各位帮忙 大家帮我看看这段代码 执行效率问题 ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的 SERVICE_NAME 关于Oracle数据文件 请问oracle安装,中途退出问题,大家帮帮忙~~ 紧急求助!如何在linux下启动oracle9 问一个PL/SQl的简单问题!大家帮忙,在线 Oracle触发器问题 oracle数据库导入问题 编写一个小函数字符串拼接
create or replace procedure procedure_name(
p_type varchar2,
o_cursor sys_refcursor
)as
begin
open o_cursor for
'select * from t1 where substr(c1,1,4) in ('||p_type||')';exception
when others then
null;
end;