开发者

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';
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜