表:tb_jc_d_terms
字段:id(主键,自增),options
要求:删除options相同,但id号较大的记录。DELETE tb_jc_d_terms FROM tb_jc_d_terms as a,
(SELECT MIN(id) as id,options FROM tb_jc_d_terms GROUP by options HAVING COUNT(*)>1) as b
WHERE a.id<>b.id and a.options=b.options;
字段:id(主键,自增),options
要求:删除options相同,但id号较大的记录。DELETE tb_jc_d_terms FROM tb_jc_d_terms as a,
(SELECT MIN(id) as id,options FROM tb_jc_d_terms GROUP by options HAVING COUNT(*)>1) as b
WHERE a.id<>b.id and a.options=b.options;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货