大数据量开发

update mes_jt_pdc tttt set tttt.flag = '1' where tttt.sid in
       (select ttt.sid from mes_jt_pdc ttt join
               (select min(sid) as id,t.dtime as time  from mes_jt_pdc t group by t.dtime having count(*) > 1) tt
       on ttt.dtime=tt.time and ttt.sid<>tt.id)

猜你喜欢

转载自aa8945163.iteye.com/blog/1329085