要求是查询并打印年龄在18-30范围的学生数据,我是这么写的
set serveroutput on
create or replace procedure S_age
as
v_sno S.sno%type;v_sname S.sname%type;v_age S.age%type;v_sex S.sex%type;v_dno S.dno%type;
cutsor c_age is select * from S where age>=18 or age<=30;
begin
open c_age;
loop
fetch c_age into v_sno,v_sname,v_age,v_sex,v_dno;
exit when c_age%notfound;
DBMS_OUTPUT.PUT_LINE('学号为'||v_sno||'的学生'||v_sname||'年龄为'||v_age);
end loop;
close c_age;
end;编译报错
4/14  PLS-00103: 出现符号 "IS"在需要下列之一时: := . ( @ % ; not null range default character
13/4  PLS-00103: 出现符号 "end-of-file"在需要下列之一时: pragma 请问该怎么改?