CREATE TRIGGER sync_t 
AFTER UPDATE ON table1
FOR EACH ROW
UPDATE table2 
SET name = NEW.name WHERE id = NEW.id;

> i have two tables namely.. table1 and table2, table1 and table2 have the two
> columns samely like id and name, by using triggers i have to bring the
> updates in table1 to table2, if i updated name in table1 trigger has to made
> the same up date for table2. please help me regarding this.
> thnaks in advance

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to