MySQL Forums
Forum List  »  Triggers

Re: Referencing NEW values in Trigger
Posted by: Roland Bouman
Date: October 28, 2005 04:33PM

I'm afraid you can't solve all that dynamically. If course, if you'd do it, it would probably perform not too good.

Do your tables definitions change that often? You could just generate the static trigger code from the information schema. In that case, you just have to make sure to generate the trigger anew once you create or alter the table, but that can usually be managed.

Bear in mind that you would already have to generate specific triggers even if you would use your dynamic solution (hence my tablename question), so why not do that properly, and put all the code there you need right away?

It's just a self plug, but it does show some things involved in generating triggers for such a purpose:

Edited 1 time(s). Last edit at 10/28/2005 04:35PM by Roland Bouman.

Options: ReplyQuote

Written By
October 27, 2005 02:17PM
October 28, 2005 03:41PM
Re: Referencing NEW values in Trigger
October 28, 2005 04:33PM

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.