create or replace trigger r_produto_01
before insert or update or delete on produto
for each row
declare
-- local variables here
begin
if inserting then
if :new.vlr_unit < 150 then
raise_application_error(-20500,'Não é permitido valor inferior a 150,00!');
end if;
elsif updating then
if :new.vlr_unit < 130 then
raise_application_error(-20500,'Não é permitido alterar para valor inferior a 130,00!');
end if;
elsif deleting then
raise_application_error(-20500,'Não é permitido deletar registros na tabela de produto');
end if;
end r_produto_01;
______________________________________
Profa: Simone Cristina Aléssio
Administração - Sistemas de Informação