select COUNT(*) as DuplicateValues,Name from tablea group by Name having count(*)>1
select COUNT(NAME) > 1