0514-86177077
9:00-17:00(工作日)
表relation
create table relation( id int primary key auto_increment, userId int not null, fanId int not null );
插入幾條數(shù)據(jù)
insert into relation(userId,fanId) values(1,1) ,(1,1) ,(1,1), (2,2),(2,2) ,(3,3),(3,3);
表中的數(shù)據(jù)
去重
delete t from relation s join relation t using(userId,fanId) where s.idt.id;
總結
以上所述是小編給大家介紹的mysql刪除重復行的實現(xiàn)方法,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
標簽:三門峽 新余 贛州 揚州 巴中 貴州 南陽 商丘
上一篇:深入淺析Mysql聯(lián)合索引最左匹配原則
下一篇:mysql保存微信昵稱特殊字符的方法
Copyright ? 1999-2012 誠信 合法 規(guī)范的巨人網(wǎng)絡通訊始建于2005年
蘇ICP備15040257號-8