存储过程的代码例子网上多得是啊。。
给你个结构create or replace procedure test
as
--定义变量
var_name varchar2(8);
begin
--这里写语句
end test;
/也可以这样:括号里是输入输出参数
create or replace procedure test()

解决方案 »

  1.   

    CREATE OR REPLACE PROCEDURE "P_CRM_MYD_CX"
    (
    p_yf varchar2,          -- 参照月份
    p_whestr varchar2,        -- 条件
    choice out admin_data.GenCurTyp
    )
    AS
      BEGIN
    select distinct a.projectid,a.projectname,b.listname from t_crm_cust_degree_detail a left join t_crm b on a.projectid=b.projectid where b.listname in(select distinct typeid from t_comm where typedesc like'myd%');
    end;
      

  2.   

    随便一本 《PL/SQL编程》得书都讲得清清楚楚,明明白白