weixin_42297548 2008-10-27 18:48
浏览 252
已采纳

mysql 重复数据删除问题

为何在mysql5.018中使用delete from test_table where id not in (select min(id) from test_table group by name)进行重复数据删除会报如下提示“you can't specify target table 'test_table' for update in from clause”

  • 写回答

2条回答 默认 最新

  • iteye_14081 2008-11-09 10:40
    关注

    [code="sql"]delete from test_table where id not in (select min(id) from test_table group by name) as t[/code]

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?