Skip to Main Content

SQL & PL/SQL

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
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,113 views