Archive for February, 2011

Using JOIN in MySQL Update statement | Coldfusion

Posted in Uncategorized on February 17, 2011 by Ron Risman

Along with a photographer and cinematographer I also use the other part of my brain for programming. I design web applications using Adobe’s Coldfusion and SQL apps such as MySQL.

I recently had to figure out how to update a field in one database table, based on information in another database table. To do this I was going to need to use a JOIN statement in order to JOIN the two database tables together based on a common field. For those who are looking to do this here is the process:

——————————————————
Update
Table_A as A JOIN Table_B as B on A.field = B.field
Set A.fieldname = ‘value’
where b.field = xxx
——————————————————-

Advertisements