连表更新数据

根据视频表更新公司表下的视频数

 

update company set video_number=(select count(id) from video_data where status=10 and company_id=company.id) where company.status=10;

posted @ 2018-01-28 15:33  爱你爱自己  阅读(315)  评论(0编辑  收藏  举报