Home >php教程 >php手册 >一种简单的表中删除重复行的方法

一种简单的表中删除重复行的方法

WBOY
WBOYOriginal
2016-06-13 10:06:161041browse

先创建一个与原表一样的表,
然后在表上创建 ignore_dup_key 索引,如下:
CREATE UNIQUE INDEX removedups
ON  #table_copy (name)
WITH IGNORE_DUP_KEY
然后在导入原表数据,简单吧


Statement:
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