有谁知道如何从中找到那些重复的记录???

pigwangrq 2004-12-23 04:04:34
我的数据表 product 中 productid 有些记录重复了!
如何把他们找出来???
大哥们帮忙呵!!!
...全文
99 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
colinliu 2004-12-23
  • 打赏
  • 举报
回复
select * from product where productid in (select productid from product group by productid having count(*) > 1)
子陌红尘 2004-12-23
  • 打赏
  • 举报
回复
select * from product where productid in(select productid from product group by productid having count(*) > 1)
LBYYBL 2004-12-23
  • 打赏
  • 举报
回复
select productid from product group by productid having count(1)>1

34,838

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧