1 update   t1   set   t1.value=t2.value   from   t2   where   t1.id=t2.id

 

 

1 update jbsite_class  set topicnum = count 
2 from (select t2.classid,count from (
3 select distinct classid,count(*as count
4 from jbsite_product
5 group by classid) t2
6 inner join  jbsite_product on jbsite_product.id = t2.classid
7 ) b where jbsite_class.id=b.classid

相关文章:

  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2022-12-23
  • 2021-12-12
  • 2021-08-16
  • 2021-09-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
相关资源
相似解决方案