最新消息: 新版网站上线了!!!

mysql用group by更新字段




UPDATE table1
JOIN (
      SELECT T1.id
        FROM
table1 T1
        WHERE T1.c = 0
        GROUP BY T1.a
        HAVING COUNT(T1.a) = 1
     )T2 ON T2.id =
table1.id
SET b = 1
WHERE 1
 
.....

转载请注明:谷谷点程序 » mysql用group by更新字段