tags:

views:

20

answers:

1

i have two tables one is table 'a' and second is table 'b'. in table 'a' there are five fields and a_id is assigned as primary key and in second table 'b' there are two fields and b_id is assigned as primary key.there is one common field name in both table as cust_name.my problem is when i insert value in table 'a' then table 'b' should also be filled with values in the respected column. how is it possible. plz help me.

A: 

You can set a trigger on insert actions into table_a and in the body of the trigger insert the required values into table_b. Check the mysql trigger syntax

Sagar V