MySQL Forums
Forum List  »  Triggers

Trigger (Sales Update)
Posted by: Joe Matthews
Date: April 10, 2018 01:53PM

Hi,

How do i create a trigger which will update the stock values in a different table, once a sale takes place?

So in my 'SALES' table, when the quantity field is updated by 1.

I need the quantity value against the same product_id, so lower by one in the 'PRODUCT' table, (against the 'STOCKLEV' field

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Trigger (Sales Update)
326
April 10, 2018 01:53PM
152
April 10, 2018 02:27PM


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.