Home > Backend Development > PHP Tutorial > A simple method to delete duplicate rows in a table_PHP tutorial

A simple method to delete duplicate rows in a table_PHP tutorial

WBOY
Release: 2016-07-13 17:02:49
Original
827 people have browsed it

First create a table that is the same as the original table,
and then create an ignore_dup_key index on the table, as follows:
CREATE UNIQUE INDEX removedups
ON  #table_copy (name)
WITH IGNORE_DUP_KEY
Then import Original table data, keep it simple


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631024.htmlTechArticleFirst create a table that is the same as the original table, and then create the ignore_dup_key index on the table, as follows: CREATE UNIQUE INDEX removedups ON #table_copy (name) WITH IGNORE_DUP_KEY Then import the original...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template