How to delete duplicates in SQL table based on multiple fields

后端 未结 9 508
星月不相逢
星月不相逢 2020-12-04 14:58

I have a table of games, which is described as follows:

+---------------+-------------+------+-----+---------+----------------+
| Field         | Type                


        
9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 15:40

    The best thing that worked for me was to recreate the table.

    CREATE TABLE newtable SELECT * FROM oldtable GROUP BY field1,field2;
    

    You can then rename.

提交回复
热议问题