1. 程式人生 > >根據select出來的數據進行update

根據select出來的數據進行update

color 根據 num pre nbsp sel 進行 col 數據

update 
  t_tbl_desc
set 
  num=b.num
from
  t_tbl_desc a,
  (select distinct(name) as name,count(name) num  from t_col_desc  group by name)b
where
   a.name=b.name

根據select出來的數據進行update