update tb1 inner join
(select type, count(*) as cnt
from tb1 group by type)
as der using(type)
set tb1.cnt = der.cnt
转载于:https://www.cnblogs.com/MarchThree/p/4641515.html
update tb1 inner join
(select type, count(*) as cnt
from tb1 group by type)
as der using(type)
set tb1.cnt = der.cnt
转载于:https://www.cnblogs.com/MarchThree/p/4641515.html