faqts : Computers : Databases : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

68 of 203 people (33%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How can I UPDATE table set field=value where field2 in (select field3 from other_table)?

Feb 24th, 2008 00:18
dman, Euan MacInnes, Darryl Plunkie, http://www.ttnr.org


The hard way by doing the select field3 from other_table first, 
storing the result in a local variable, comma separated, and then 
running a second query