这是我写的一个小测试代码。
CREATE procedure abc
IS
tempHistoricalClassAvg integer;
begin
select avg(e.obtainedquizscore)
into tempHistoricalClassAvg
, e.courseid
from evaluation e
where e.courseid = 1
and e.instructorid =1
group by e.courseid;
dbms_output.Put_line(tempHistoricalClassAvg);
end;
我收到编译错误
Error(5,62): PLS-00201: identifier 'E.COURSEID' must be declared
E.courseid出现在表格中,因为下面的查询工作正常
select avg(obtainedquizscore) as avgquizscore
, courseid
from evaluation
where courseid = 1
and instructorid =1
group by courseid;
我哪里错了? :/