SQL Server 中获取重复数据值

获取重复的数据的值:

  SELECT  AccountCode
  FROM [EZTecProjectManage].[dbo].FeeSetting 
  group by AccountCode,MoneyType
  having(count(1)>1)

《SQL Server 中获取重复数据值》

获取重复数据的记录

  select AccountCode from [EZTecProjectManage].[dbo].FeeSetting  where AccountCode in
(
  select AccountCode from [EZTecProjectManage].[dbo].FeeSetting 	
  group by AccountCode,MoneyType
  having(count(1)>1)
)

《SQL Server 中获取重复数据值》

    原文作者:用户147258369
    原文地址: https://blog.csdn.net/hyq_07_27/article/details/120455524
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞