MySQL Forums
Forum List  »  Triggers

Re: Triggers in MySQL 5.0.11
Posted by: Roland Bouman
Date: August 18, 2005 03:38PM

Hi Peter,

Instead of SHOW CREATE TRIGGER, you can do

select concat(
'create trigger',char(10)
,event_object_schema,'.',trigger_name,char(10)
,action_timing,char(10)
,event_manipulation,char(10)
,'on',char(10)
,event_object_schema,'.',event_object_table,char(10)
,'for each row'
,action_statement
)
from information_schema.triggers


You can add your own where clause to filter those triggers you want:

event_object_schema -> schema wherein the table on which the trigger is defined resides (is also the schema wherein the trigger resides)
event_object_table -> name of the table wherin the object resides
trigger_name -> name of the trigger (unique within the schema)
action_timing -> before or after
event_manipulation -> insert, update, delete

(action_timing and event_manipulation are unique per table)

Options: ReplyQuote


Subject
Views
Written By
Posted
7598
August 18, 2005 09:59AM
Re: Triggers in MySQL 5.0.11
3235
August 18, 2005 03:38PM
2789
August 18, 2005 04:12PM
3137
August 18, 2005 06:40PM
2783
August 18, 2005 07:08PM
2657
August 18, 2005 08:30PM
2692
August 19, 2005 05:51AM
2568
August 19, 2005 02:05PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.