MySQL Forums
Forum List  »  Triggers

how to create a trigger for certain rows?
Posted by: William Lou
Date: August 12, 2008 01:30PM

I'm newbie to triggers. I don't know if it's possible to create a trigger which won't be fired by each row but only by certain rows. For example, I have a table A with two columns `product_ID`, `product_type`, and then I wan to create a trigger on table A which will be fired only when a certain product ( where `product_type` = 'TV' etc..) is inserted into table A. How could I put the condition into the trigger that it will only be fired when a record with type 'TV' is inserted into the table? Thanks for your help!

Options: ReplyQuote


Subject
Views
Written By
Posted
how to create a trigger for certain rows?
2707
August 12, 2008 01:30PM


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.