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