For finding duplicate:
SELECT [colName],
COUNT([colName]) AS NumOccurrences
FROM TableName
GROUP BY [colName]
HAVING ( COUNT([colName]) > 1 )
For finding rows that occur exactly once:
SELECT [colName]
FROM TableName
GROUP BY [colName]
HAVING ( COUNT([colName]) = 1)
SELECT [colName],
COUNT([colName]) AS NumOccurrences
FROM TableName
GROUP BY [colName]
HAVING ( COUNT([colName]) > 1 )
For finding rows that occur exactly once:
SELECT [colName]
FROM TableName
GROUP BY [colName]
HAVING ( COUNT([colName]) = 1)