triggers- how to bring updates in one table to another table
am 28.01.2010 10:33:56 von muralikrishna g
--001517576a52d58d3e047e3637cf
Content-Type: text/plain; charset=ISO-8859-1
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
--001517576a52d58d3e047e3637cf--
Re: triggers- how to bring updates in one table to another table
am 28.01.2010 11:13:53 von Alexander Kolesen
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=gcdmg-mysql-2@m.gmane.org