Home » SQL & PL/SQL » SQL & PL/SQL » Regarding Trigger
Regarding Trigger [message #231601] Tue, 17 April 2007 12:28 Go to next message
chandrasekharbomminisidda
Messages: 21
Registered: March 2007
Location: Chennai
Junior Member
Respected Sir,

I am having trigger

create or replace trigger ALL_REPORT_USER_df_tr
before insert on ALL_REPORT_USER_df
for each row
begin
if (:new.user_id is null) then
dbms_output.put_line('Invalid input value');
end if;
end;

When i tried to insert null value for user_id in table
ALL_REPORT_USER_df the above trigger it's not fired.
Even there is no constraint on user_id in this table.
I am not getting why.

Please help me regarding above said problem

Sincerely,
Chandrasekhar B.S
Re: Regarding Trigger [message #231602 is a reply to message #231601] Tue, 17 April 2007 12:32 Go to previous messageGo to next message
BlackSwan
Messages: 25033
Registered: January 2009
Location: SoCal
Senior Member
>ALL_REPORT_USER_df the above trigger it's not fired.
Based upon what evidence?
You will NOT see anything from DBMS_OUTPUT within the trigger EVER!

[Updated on: Tue, 17 April 2007 12:32] by Moderator

Report message to a moderator

Re: Regarding Trigger [message #231603 is a reply to message #231602] Tue, 17 April 2007 12:35 Go to previous messageGo to next message
chandrasekharbomminisidda
Messages: 21
Registered: March 2007
Location: Chennai
Junior Member
Respected sir,

so instead of dbms_output which statement i have to user inorder to see the output in trigger

Sincerely,
Chandrasekhar B.S.
Re: Regarding Trigger [message #231605 is a reply to message #231601] Tue, 17 April 2007 12:42 Go to previous messageGo to next message
michael_bialik
Messages: 611
Registered: July 2006
Senior Member
Use RAISE APPLICATION ERROR
Re: Regarding Trigger [message #231607 is a reply to message #231605] Tue, 17 April 2007 12:48 Go to previous message
chandrasekharbomminisidda
Messages: 21
Registered: March 2007
Location: Chennai
Junior Member
Respected Sir,

Thank's a lot for your valuable reply for my question.

Sincerely,
Chandrasekhar B.S.
Previous Topic: Query problems
Next Topic: add column not null in a not empty table
Goto Forum:
  


Current Time: Fri Dec 02 16:45:02 CST 2016

Total time taken to generate the page: 0.25765 seconds