SQL在单一表中查询具有重复字段值的记录:主要使用HAVING Count(*)>1方法来实现
SELECT T_User.UserName, T_User.UserID FROM T_User WHERE (((T_User.UserName) In (SELECT [UserName] FROM [T_User] As Tmp GROUP BY [UserName] HAVING Count(*)>1 ))) ORDER BY T_User.UserName;
SQL在单一表中查询具有重复字段值的记录:主要使用HAVING Count(*)>1方法来实现
SELECT T_User.UserName, T_User.UserID FROM T_User WHERE (((T_User.UserName) In (SELECT [UserName] FROM [T_User] As Tmp GROUP BY [UserName] HAVING Count(*)>1 ))) ORDER BY T_User.UserName;