查询某列重复的记录

select apsh.apsh_team_group_id from active_photos_site_hierarchy apsh
where apsh.apsh_team_group_id in (
 select apsh1.apsh_team_group_id  from  active_photos_site_hierarchy apsh1
 group by apsh1.apsh_team_group_id
 having count(apsh1.apsh_team_group_id) > 1)
group by apsh.apsh_team_group_id
order by apsh.apsh_team_group_id

阅读更多
文章标签: hierarchy
个人分类: SQL Server
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭