17,086
社区成员
发帖
与我相关
我的任务
分享
create or replace procedure myProcedure(std_id in varchar2) is
type mark_record_type is RECORD(
mark_sno SC.SNO%TYPE,
mark_cno SC.CNO%TYPE,
mark_score SC.SCORE%TYPE);
mark_record mark_record_type;
type sc_cursor is ref cursor;
my_cursor sc_cursor;
total_mark number;
avg_mark number;
max_mark number;
min_mark number;
begin
open my_cursor for
select sno, cno, score from SC where sno = std_id;
fetch my_cursor
into mark_record;
close my_cursor;
end;
测试了下这样子么问题。