myBlog

Join update MySQL

on October 19, 2011

Syntax :

UPDATE Table1 JOIN Table2
ON Table1.Column1 = Table2.Column2
SET Table1.Column2 = Table2.Column2,
Table1.Column3 = Table2.Column3 * 1.2
where Table1.Column4 = xxx;

Links :
http://dev.mysql.com/doc/refman/5.0/en/update.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: