mysql - Update in the same table with an inner join -
my actual (and broken) query this:
update t_1 set b=(select b t_1 a=1) b=1
how can using inner join?
you can cheat mysql on this:
update t_1 set b=(select b (select * t_1) t a=1) b=1
a join version:
update t_1 join (select * t_1) t on t.a = 1 , t_1.b=1 set t_1.b= t.b;
where source proving sub queries slower joins?
Comments
Post a Comment