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

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

WBOY
Release: 2016-06-13 10:06:16
Original
1028 people have browsed it

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


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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template