为什么总是Warning: Trigger created with compilation errors,哪错了?
createorreplacetriggertnbeforeinsertondeptforeachrowdeclaredeptnamedept.dname%typebeg...
create or replace trigger tn
before insert on dept
for each row
declare
deptname dept.dname%type
begin
select dname into deptname from dept
where deptno=new.deptno;
if deptname='SASLES' then
raise_application_error(-20000,'禁止插入');
end if;
end tn; 展开
before insert on dept
for each row
declare
deptname dept.dname%type
begin
select dname into deptname from dept
where deptno=new.deptno;
if deptname='SASLES' then
raise_application_error(-20000,'禁止插入');
end if;
end tn; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询