删除重复数据

delete  表名 where 主键 in (select max(主键) as maxId  from 表名 where add_date = '2013-11-11' group by ticket_id having count(*) > 1)

 

posted @ 2014-08-12 20:53  团长丶Joe  阅读(114)  评论(0编辑  收藏  举报