create or replace trigger sm_insert
before insert on sm_110
for each row
declare
n number:=0;
begin
select count(*) into n
from sm_refuse where tele_num= :new.dest_tele_num;
if n>0 then
rollback;
end if;
end sm_insert;
before insert on sm_110
for each row
declare
n number:=0;
begin
select count(*) into n
from sm_refuse where tele_num= :new.dest_tele_num;
if n>0 then
rollback;
end if;
end sm_insert;
另外如果定义异常,直接抛出,是否就可以了