我下面那些代码,为何编译时出错:“警告: 创建的过程带有编译错误。” create or replace procedure stu_be_search1 (stuid in number,benefitcount out number ,benefitexsit out boolean) as ben_id number; bcount number; cursor cur_benid is select benefit_count from sy.benefit_info where sy.benefit_info.benefit_id = ben_id begin select benefit_id into ben_id from sy.student_info where sy.student_info.stu_id = stuid; benefitexsit := true; begin open cur_benid ; fetch cur_benid into bcount ; if bcount > 0 then benefitcount := bcount; else benefitcount := null; end if; close cur_benid; end; exception when no_data_found then benefitexsit := false; end;
create or replace procedure stu_be_search1 (stuid in number,benefitcount out number ,benefitexsit
out boolean)
as
ben_id number;
bcount number;
cursor cur_benid is
select benefit_count from sy.benefit_info
where sy.benefit_info.benefit_id = ben_id
begin
select benefit_id into ben_id from sy.student_info
where sy.student_info.stu_id = stuid;
benefitexsit := true;
begin
open cur_benid ;
fetch cur_benid into bcount ;
if bcount > 0 then
benefitcount := bcount;
else
benefitcount := null;
end if;
close cur_benid;
end;
exception when no_data_found then
benefitexsit := false;
end;