DBMS_OUTPUT.PUT_LINE in Trigger
630050Mar 24 2008 — edited Mar 24 2008Hi All,
I am new to trigger and this is my first post in this forum. I have written a trigger and code is given below. When I run this trigger I am not getting any exception or error message if the ID < 100..Please help me identify the problem.
code:
create or replace
trigger "T_EMP_TRIGGER"
before insert or update on THAN_EMP
for each row
declare
my_error EXCEPTION;
begin
if :new.ID < 100 then
dbms_output.put_line('Value should be higher than 100') ;
raise my_error;
end if;
EXCEPTION
When my_error then
dbms_output.put_line('Value should be higher than 100') ;
end;