liting李

2020-07-10   阅读量: 787

Mysql

一个表中的Id有多个记录,如何把所有这个id的记录查出来,并显示共有多少条记录数?

扫码加入数据分析学习群

select id, Count(*) from tb group by id having count(*)>1
select * from(select count(ID) as count from table group by ID)T where T.count>1

18.4854 3 1 关注作者 收藏

评论(0)


暂无数据

推荐课程

推荐帖子