Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DBMS_OUTPUT.PUT_LINE in Trigger

630050Mar 24 2008 — edited Mar 24 2008
Hi 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;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 21 2008
Added on Mar 24 2008
6 comments
4,338 views