2020-07-10
阅读量:
1091
一个表中的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






评论(0)


暂无数据
推荐帖子
0条评论
1条评论
0条评论