evergrean100
Technical User
Anyway to create my own customized message after a insert or update in a Oracle 9i table?
Here is my trigger attempt:
This trigger did output a message on a blank insert attempt but also said I had invalid value in Trigger line 5. And it wouldnt allow any update to the city field which is not what I wanted. The update attempt froze up and nothing happened on my attempt.
I want a null value allowed for the city field and would like to have an output message or ora code number output if someone updates or inserts a null value in the city field.
I also tried dbms_ouitput.put_line('NO DATA ENTERED'); and it didnt output anything.
Here is my trigger attempt:
Code:
DECLARE
city varchar2(100);
Begin
if city is null then
RAISE_APPLICATION_ERROR(-20000,'NO DATA ENTERED');
end if;
end;
This trigger did output a message on a blank insert attempt but also said I had invalid value in Trigger line 5. And it wouldnt allow any update to the city field which is not what I wanted. The update attempt froze up and nothing happened on my attempt.
I want a null value allowed for the city field and would like to have an output message or ora code number output if someone updates or inserts a null value in the city field.
I also tried dbms_ouitput.put_line('NO DATA ENTERED'); and it didnt output anything.