CSDN博客

img UglyBean

sql 寻找重复记录

发表于2004/9/16 17:18:00  999人阅读

分类: Coding日志

SELECT UID, dd
FROM (SELECT UID, COUNT(UID) AS dd
        FROM dbo.CN_Infomation
        GROUP BY UID) DERIVEDTBL
WHERE (dd > 1)

SELECT *
FROM Members
WHERE (Member_ID IN
          ((SELECT Member_ID
          FROM (SELECT Member_ID, COUNT(Member_ID) AS dd
                  FROM dbo.Members
                  GROUP BY Member_ID) DERIVEDTBL
          WHERE (dd > 1))))
ORDER BY Member_ID DESC

 

 

0 0

相关博文

我的热门文章

img
取 消
img