create or replace trigger tri_ins2
before insert on sc
for each row
declare
tri_sno varchar2(30);
tri_cno varchar2(30);
begin
select sno,cno into tri_sno,tri_cno from sc where grade between 0 and 100;
if(:new.sno = tri_sno and :new.cno=tri_cno and :new.grade in(0,100)) then dbms_output.put_line('您已成功插入一条数据!');
else
dbms_output.put.line('查不到学生信息,请重新输入!');
end if;
end tri_ins2;
8/1 PL/SQL: Statement ignored
8/17 PLS-00225: 子程序或游标 'PUT' 引用超出范围
SQL>
这个错误不会改了,大家帮帮我
