28,391
社区成员
发帖
与我相关
我的任务
分享
update t2 set total=(select count(*) from t1 where t1.column1 = t2.column1)
--查询
select column1,count(1) total from t1 group by column1
--更新
update t2 set total=(select count(1) from t1 where t1.column1 = t2.column1)
--插入
insert into t2 select column1,count(1) total from t1 group by column1