我得到了我认为是一个程序无意义的错误。
CREATE OR REPLACE PACKAGE reg AS
TYPE ref_cursor IS ref cursor;
...
FUNCTION show_enrollments RETURN ref_cursor;
PROCEDURE return_prereqs
(param_dept_code IN prerequisites.dept_code%type,
param_course_no IN prerequisites.course_no%type);
> PROCEDURE enroll
> (param_sid IN enrollments.sid%type,
> param_classid IN enrollments.classid%type,
> err_msg OUT varchar(76));
PROCEDURE delete_student
(param_sid IN enrollments.sid%type);
...
END;
/
show errors
我收到的错误
LINE/COL ERROR
-------- -------
31/23 PLS-00103: Encountered the symbol "(" when expecting one of the
following:
:= . ) , @ % default character
The symbol ":=" was substituted for "(" to continue.
我得到的包体错误
LINE/COL ERROR
-------- -------
328/23 PLS-00103: Encountered the symbol "(" when expecting one of the
following:
:= . ) , @ % default character
The symbol ":=" was substituted for "(" to continue.
这是程序包正文中的程序
PROCEDURE enroll
(param_sid IN enrollments.sid%type,
param_classid IN enrollments.classid%type,
err_msg OUT varchar(76))
IS...
我在这里做些蠢事吗?我看不出有什么不对,而且非常令人沮丧。
答案 0 :(得分:2)
我很确定它是err_msg OUT varchar(76)
,因为Oracle中没有VARCHAR
数据类型,只有VARCHAR2
。
尝试:
PROCEDURE enroll
(param_sid IN enrollments.sid%type,
param_classid IN enrollments.classid%type,
err_msg OUT varchar2(76))
IS...
答案 1 :(得分:1)