MySQL Forums
Forum List  »  Triggers

Re: Display triggers that already exist...
Posted by: Peter Brawley
Date: July 27, 2006 09:18AM

CREATE PROCEDURE ShowCreateTrigger( IN db CHAR(64), IN tbl CHAR(64) )
BEGIN
SELECT
CONCAT(
'CREATE TRIGGER ',trigger_name, CHAR(10),
action_timing,' ', event_manipulation, CHAR(10),
'ON ',event_object_schema,'.',event_object_table, CHAR(10),
'FOR EACH ROW',CHAR(10),
action_statement,CHAR(10)
) AS 'Triggers'
FROM information_schema.triggers
WHERE event_object_schema = db AND event_object_table = tbl;
END;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Display triggers that already exist...
2746
July 27, 2006 09:18AM


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.