Hello:
I try to create my first sample trigger regarding checks inserts and updates on the attribute LOC of the DEPT table. If the new value is 'Houston', change it to 'Chicago'.
***************************************************
CREATE OR REPLACE TRIGGER DEPT
BEFORE INSERT OR UPDATE
ON DEPT
BEGIN
If new.loc = 'Houston' Then
new.loc := 'Chicago';
End If;
END;
***************************************************
But I have a error as : Warning: Trigger created with compilation errors.
Anyone can help!!
Thanks
I try to create my first sample trigger regarding checks inserts and updates on the attribute LOC of the DEPT table. If the new value is 'Houston', change it to 'Chicago'.
***************************************************
CREATE OR REPLACE TRIGGER DEPT
BEFORE INSERT OR UPDATE
ON DEPT
BEGIN
If new.loc = 'Houston' Then
new.loc := 'Chicago';
End If;
END;
***************************************************
But I have a error as : Warning: Trigger created with compilation errors.
Anyone can help!!
Thanks