删除 table 中具有相同名称的列重复 2 次或更多次的所有行(但我不知道它们的名字)

Delete all rows in a table which a column has the same name repeated 2 or more times (but i don't know their names)

我想删除 table 中列名相同的所有行...

但我不知道 column_1 中值的名称。

总是 column_1 会是重复的... column_2 不会。有可能这样做吗?谢谢。

示例:

column_1 column_2
1 2
2 3
3 4
3 5
4 6
5 7
5 8
5 9

预计:

column_1 column_2
1 2
2 3
4 6

使用子查询来帮助您:

DELETE  FROM `TableName` where column_1 in 
    (select column_1 FROM 
        (select column_1 FROM `TableName` GROUP BY `column_1` HAVING count(column_1)>1) AS t1
    )