mysql查询字段重复数据

-- 查询表的某个字段数据重复的所有数据:table-表,a-重复字段
mysql> select * from table WHERE a in ( select a from  table group by a having count(a)>1)

注释table-表,a-重复字段

发布了22 篇原创文章 · 获赞 9 · 访问量 7665

猜你喜欢

转载自blog.csdn.net/qq_35719898/article/details/103578570
今日推荐