一、刪除數據庫中表的某些相同的某些記錄
delete from tablename where only_Id not in(select min(only_id) from tablename group by sameName)
二、選出相同記錄的SQL語句 AND 刪除相同記錄的SQL語句刪除相同記錄的SQL語句
//IF 表中無主鍵,ID中無(IDENTITY(1,1)),ID相同的記錄刪除?
a、select * from tableName where id in(select id from tableName group by id having count(*) >1)
b、delete from tableName where id in(select id from talbeName group by id having count(*) >1)