Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Trigger - Close but no cigar?
Hi,
I'm trying to create a security trigger that will secure one column in a table from any updates or deletions. I think it's close, but it's still coming up with an error message that I can't resolve.
This trigger is:
create or replace trigger secure_freight_columns
before delete or update of remit on frt.freight
declare
cannot_change EXCEPTION;
begin
raise cannot_change;
EXCEPTION
WHEN cannot_change then
raise_application_error(-12345,'May not CHANGE or DELETE
the REMIT column');
end;
The Errors that occur at run time when I change the "remit" column are:
ORA-20324: May not CHANGE or DELETE the REMIT column ORA-06512: at "ZP29.SECURE_FREIGHT_COLUMNS", line 7 ORA-04088: error during execution of trigger'ZP29.SECURE_FREIGHT_COLUMNS' Can anyone please tell me what to do to get over the hump with this one...appreciate it greatly!
Andy