How to select duplicate values in a SQL table

First make a selection of duplicate values using count:
SELECT
col1, COUNT(col1) AS CountOf
FROM test
GROUP BY col1
HAVING COUNT(col1)>1

Then join this selection with the table on table keys:

select [key],a.col1 from
test a
inner join (SELECT
col1, COUNT(col1) AS CountOf
FROM test
GROUP BY col1
HAVING COUNT(col1)>1) b on a.col1 = b.col1