MySql deduplication

Recently, I am working on an online reading website. The content of the website is obtained by crawling other websites. Later, I found that a lot of data is duplicated. I need to delete the duplicated data. I tried several methods and finally deleted it successfully.

      delete from novel where id not in(

      select b. id  from(  select min(id) as id from novel group by(book_name) ) as b)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325002391&siteId=291194637