189 8069 5689

oracle中如何调用存储过程

一、通过pls块来调用存储过程;

让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:主机域名、网络空间、营销软件、网站建设、城阳网站维护、网站推广。

declare

 p_dzno varchar2(50);

 p_vchtype  VARCHAR2(50);

 p_productclass  VARCHAR2(50);

 p_dptcode  VARCHAR2(50);

 

begin

    p_vchtype:='MP';

    p_productclass:='03';

    p_dptcode:='206';

    

     PRODDATA.product_dz_proc.pd_getdzno(p_dzno,p_vchtype,p_productclass,p_dptcode);

     DBMS_OUTPUT.put_line(p_dzno);

end;

二、oracle 匿名块执行sql

declare

   CURSOR  flag_cur IS  select lp.product_code from lxg_product lp;  

   productInfo flag_cur%ROWTYPE;

   flag char(1);

begin

 for  productInfo in flag_cur loop

        select decode(

        (select count(g.product_code)

           from ahs_policy_product g

          where g.product_code=productInfo.product_code

            and g.updated_date > date '2015-07-01'

            and g.created_by not in ('BIS', 'PTP', 'pacard', 'admin')

            and g.created_by not in (select t.um_code from t_ptp_agent_account_info t)

            and rownum = 1),0,'N','Y') into flag from dual;

         DBMS_OUTPUT.PUT_LINE(productInfo.product_code ||','|| flag); 

 end loop;

end;

/


网站栏目:oracle中如何调用存储过程
浏览路径:http://cdxtjz.cn/article/ppopdh.html

其他资讯