1 2 3 4 |
update inventory_log as a inner join orders as b on a.order_id = b.id set a.device_cat = b.product_id where b.product_id > 127 AND b.id < 381726 |
Reference:
Update from a select:
1 2 3 4 5 6 7 |
set @post_id = 40; update `wp_posts` as a, (SELECT post_content FROM `wp_posts` where post_parent = @post_id ORDER BY id desc limit 0, 1) as b set a.post_content = b.post_content where a.id = @post_id |