Updating a table column based on another tables results using mysql only
I have a set of results - SELECT id FR开发者_运维知识库OM recruit_index WHERE YEAR NOT LIKE '2011'
I need to update another table column based on each of the above ids using mysql only.
Could anyone point me in the right direction?
Thanks in advance
Mike
Use:
UPDATE recruit_index, other_table set other_table.column={new value here}
WHERE recruit_index.id = other_table.id and recruit_index.year not like '2011';
精彩评论