Home > Database > Mysql Tutorial > body text

mysql 数据表中查找重复记录

WBOY
Release: 2016-06-07 18:01:38
Original
1112 people have browsed it

以下sql语句可以实现查找出一个表中的所有重复的记录

代码如下:
select user_name,count(*) as count from user_table group by user_name having count>1;

这个我在很早有发过一个asp下的ACCESS 的
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