update u
set
commentCount=(select isnull(count(*),0) from comment where addUserID=u.userID)
from
[user] u
set
commentCount=(select isnull(count(*),0) from comment where addUserID=u.userID)
from
[user] u
--or
update a set commentCount=(select count(*) from comment where addUserID=a.userID) from [user] a