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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Basic Question on Oracle Trigger Execution

715303Jan 6 2010 — edited Jan 13 2010
Say for example that I have this trigger code:
CREATE TRIGGER schema.trigger_name 
    BEFORE 
    DELETE OR INSERT OR UPDATE 
    ON schema.table_name 
       pl/sql_block
END trigger_name;
ALTER TRIGGER schema.trigger_name ENABLE;
commit;
The weird part is I have written this trigger but do not know how to execute it. Can someone give me answer for these question, please?

1. How do I add this trigger on a table "table_1"
2. I want the trigger to be permanent on the table_1 and not only for a particular session. How do I do that?
3. Is there anything else I need to take care of while executing a trigger? Something like Best Practices?

I am on Linux. So, please give your solution based on SQL Plus

EDIT: Also How can I ensure that the trigger is there. Is there any way to see it?

Edited by: TuX4EvA on Jan 6, 2010 3:24 AM
This post has been answered by Pierre Forstmann on Jan 6 2010
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 10 2010
Added on Jan 6 2010
5 comments
1,143 views