MySQL Forums
Forum List  »  Triggers

Re: Updatable Columns in Update Trigger
Posted by: Andrew Gilfrin
Date: November 16, 2005 08:43AM

Hi Vishal

Unfortunately it's not possible to have when conditions on Triggers, in part this is cannot be implemented in MySQL because only allows a single trigger per event/table combination (i.e. only on insert/update/delete trigger per table).

The only way to implement this is to write a generic trigger which then uses if statements to work out if it should fire or not. You mention the overhead of this which I also discuss on my site http://mysql.gilfster.com/page.php?parent_id=2&page_id=2.0.5

At present it will have to be a case of taking the performance hit or not using triggers to implement your requirements.

Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog

http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information

Options: ReplyQuote


Subject
Views
Written By
Posted
3005
November 16, 2005 07:15AM
Re: Updatable Columns in Update Trigger
2147
November 16, 2005 08:43AM
1944
November 17, 2005 03:37AM


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.