MySQL Forums
Forum List  »  Triggers

Need Trigger to auto fill insert from data in another table
Posted by: Paul Littrell
Date: July 25, 2013 10:42AM

I am attempting to use triggers to auto populate 3 fields when a record is created. I have one table {table1} with 4 fields user_id(key field), user_name, department,manager. What I would like to happen is when a record is added to {table2} which will only have the user_id in the record, to pull the name, department, and manager from {table1}.
I cannot seem to figure out if this is possible using triggers, or the syntax if it is. Has anyone done this? And if so, could share the syntax with me?

Thank you,
Paul Littrell

Options: ReplyQuote


Subject
Views
Written By
Posted
Need Trigger to auto fill insert from data in another table
5021
July 25, 2013 10:42AM


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.