网上找的

createorreplaceprocedure Query_By_Key
(
p_key1 invarchar2,
p_key2
invarchar2,
p_cursor out
JN_TABLE.JN_CTable
)*
is
str_Sql  varchar2(500):=' select * from
TableA'|| 
                        ' where    pname like :v_key1   and pname
like :v_key2 ' ;
begin
         open p_cursor for str_Sql using  '%'||
p_key1||'%' , '%'|| p_key2||'%';
end   Query_By_Key;

引用原文:

http://www.cnblogs.com/luoht/archive/2010/04/30/1725400.html

http://www.oracle.com.cn/viewthread.php?tid=35796

 

 

posted on 2012-10-27 13:35  王玉涛  阅读(10443)  评论(0编辑  收藏  举报