Remove duplicates using only a MySQL query?

后端 未结 7 1210
死守一世寂寞
死守一世寂寞 2020-11-27 07:55

I have a table with the following columns:

URL_ID    
URL_ADDR    
URL_Time

I want to remove duplicates on the URL_ADDR column

7条回答
  •  广开言路
    2020-11-27 07:59

    Daniel Vassallo How to for multiple column?

    DELETE t2 FROM directory1 t1 JOIN directory1 t2 ON (t2.page = t1.page, t2.parentTopic = t1.parentTopic, t2.title = t1.title, t2.description = t1.description, t2.linktype = t1.linktype, t2.priority = t1.priority AND t2.linkID > t1.linkID);

    maybe like this?

提交回复
热议问题