select Id from MyTable group by Id having count(*) > 1
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.