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保存微信昵稱特殊字符的方法
Copyright ? 1999-2012 誠信 合法 規范的巨人網絡通訊始建于2005年
蘇ICP備15040257號-8