0514-86177077
9:00-17:00(工作日)
表relation
create table relation( id int primary key auto_increment, userId int not null, fanId int not null );
插入几条数据
insert into relation(userId,fanId) values(1,1) ,(1,1) ,(1,1), (2,2),(2,2) ,(3,3),(3,3);
表中的数据
去重
delete t from relation s join relation t using(userId,fanId) where s.idt.id;
总结
以上所述是小编给大家介绍的mysql删除重复行的实现方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!
标签:三门峡 新余 赣州 扬州 巴中 贵州 南阳 商丘
上一篇:深入浅析Mysql联合索引最左匹配原则
下一篇:mysql保存微信昵称特殊字符的方法