根据视频表更新公司表下的视频数
update company set video_number=(select count(id) from video_data where status=10 and company_id=company.id) where company.status=10;
根据视频表更新公司表下的视频数
update company set video_number=(select count(id) from video_data where status=10 and company_id=company.id) where company.status=10;
转载于:https://www.cnblogs.com/grimm/p/8371279.html