tags:

views:

21

answers:

1

Hi everyone

I have a set of results - SELECT id FROM 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

+1  A: 

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';
Dan
+1: I like ANSI-92 JOIN syntax over the ANSI-89 used here, but otherwise 100% correct for MySQL
OMG Ponies