Home >Backend Development >PHP Tutorial >如何查询数据库中有没有重复的数据

如何查询数据库中有没有重复的数据

WBOY
WBOYOriginal
2016-06-13 10:37:291862browse

怎么查询数据库中有没有重复的数据
在已经添加的数据中可能有重复的数据,怎么把重复的找出来?

------解决方案--------------------
select * from test a inner join (select title from test group by title having(count(*)) >1) b on a.title=b.title

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