MySQL Forums
Forum List  »  Triggers

Create trigger to get ID of the foreign Key
Posted by: Harold Content
Date: May 08, 2014 04:49AM

I found out that a trigger can be helpfull to do action on inserting a new row.
An product has a brand when inserting i need the primairy key(id number) form the brand name to to put in the record for the product.

What would be a trigger that helps to get the id form the brand

1 Brand A
2 Brand B
3 Brand C


Example
Toy1,1,pcs,Brand A


for the product table i need:

Toy1,1,pcs,1

Options: ReplyQuote


Subject
Views
Written By
Posted
Create trigger to get ID of the foreign Key
1864
May 08, 2014 04:49AM


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.