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

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

WBOY
Release: 2016-06-13 13:15:44
Original
1100 people have browsed it

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

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

Related labels:
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