创建存储过程实现功能是:根据学号打印输出该学生的平均成绩,下列正确的语句是:
A. CREATE OR REPLACE PROCEDURE proc_1 (xuehao OUT varchar2)ASavg1 number;BEGINSELECT avg(成绩) INTO avg1 FROM CJBWHERE学号=xuehao;DBMS_OUTPUT.PUT_LINE(avg1);END;
B. CREATE OR REPLACE PROCEDURE proc_1 (xuehao IN varchar2)ASavg1 varchar2;BEGINSELECT avg(成绩) INTO avg1 FROM CJBWHERE学号=xuehao;DBMS_OUTPUT.PUT_LINE(avg1);END;
CREATE OR REPLACE PROCEDURE proc_1 (xuehao IN varchar2)ISavg1 number;BEGINSELECT avg(成绩) INTO avg1 FROM CJBWHERE学号=xuehao;DBMS_OUTPUT.PUT_LINE(avg1);END;
D. CREATE OR REPLACE PROCEDURE proc_1 (xuehao IN varchar2)ASavg1 number;BEGINSELECT avg(成绩) INTO avg1 FROM CJBWHERE学号=xuehao;DBMS_OUTPUT.PUT_LINE(avg1);END;