色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

mysql查詢消除重復(fù),mySQL刪除相同數(shù)據(jù)的SQL語句怎么寫

錢良釵2年前20瀏覽0評論
mysql查詢消除重復(fù),mySQL刪除相同數(shù)據(jù)的SQL語句怎么寫?

如果是重復(fù)的內(nèi)容只保留一條,可以試試 delete from t where id not in ( select id from t group by c1, c2, c3, c4)

如果所有重復(fù)的內(nèi)容都刪掉可以試試 delete from t where id not in ( select id from t group by c1, c2, c3, c4 having count (*) < 2)