I am using two tables.
User table
contains the firstname and lastname field
and contactinfo is another table
contain the field called 'Name'
with usertable Id.I want to make a trigger whenever the User tables firstname or lastname is updated
I want change this contactinfo's Name to whatever they changed in the User table.Is it possible through trigger?Please give me some ideason this?
views:
44answers:
2
+2
A:
The general syntax of CREATE TRIGGER is :
CREATE TRIGGER trigger_name trigger_time trigger_event ON tbl_name
FOR EACH ROW trigger_statement
Take a look at examples at http://www.roseindia.net/mysql/mysql5/triggers.shtml and http://dev.mysql.com/doc/refman/5.1/en/create-trigger.html
Adnan
2010-10-05 09:31:45