查詢不重覆的資料:
Select * From TableName Where Id(識別碼) In (Select Max(Id) From TableName
Group By 有重覆值欄位)
刪除重覆的資料:
DELETE
TableName where
Id(識別碼) NOT IN (Select Max(Id) From
TableName Group By
有重覆值欄位 )
參考資料:http://www.dotblogs.com.tw/lastsecret/archive/2010/07/13/16532.aspx