update w
set w.TagCount=x.TagCount
from (select ItemID,COUNT(*) as TagCount from r where IsValid=1 group by ItemID) as x
where ID =4 and IsValid=1 and w.ID=x.ItemID
相关文章:
- SQL 批量 更新 表所对应数据 2022-02-21
- Sql Server根据记录集批量更新数据库 2022-12-23
- 批量更新mysql表数据 2021-11-07
- SQL批量更新 关系表更新 2021-10-19
- SQL批量更新 关系表更新 2021-07-25
- MySQL 多表批量更新 2022-12-23
- SQL批量更新数据(自用) 2022-12-23