[thelist] mysql UPDATE SELECT query

Brian Cummiskey brian at hondaswap.com
Wed Apr 2 00:31:15 CDT 2008


How about an update self-join?


update ads a
set img_1_small = b.img_1_small
from ads b
left outer join ads a on a.id = b.id
where a.img_1_small is NULL



More information about the thelist mailing list