MySQL Forums
Forum List  »  InnoDB

Cascading Insert via a Trigger
Posted by: Steve Johnson
Date: April 29, 2008 11:13AM

I need to insert records into a child table within a trigger. When a new Survey record is added, I want the Question Table copied to the Answer Table to maintain the answers.

SurveyTable
ID

AnswerTable
ID
SurveyID
QuestionID
Answer

QuestionTable
ID
Question

I’m not sure of the syntax, I’m new to MySQL. I have been doing this with Firebird/Interbase for years using the “FOR SELECT” syntax.

Thanks,
Steve

Options: ReplyQuote


Subject
Views
Written By
Posted
Cascading Insert via a Trigger
3370
April 29, 2008 11:13AM


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.