Finding Duplicates in a Table 's Column

I assume You have Northwind Database.

I will be using The Employee Table.

As Show in the figure there are 6 Selected cells which are the Duplicates( Just assume it)
I want to find this number ( i mean 6.)

The query for the above is:

SELECT  Title
, COUNT(Title) AS NumOccurrences
FROM dbo.Employees
GROUP BY Title
HAVING ( COUNT(Title) > 1 )

SELECT *
FROM dbo.Employees

 

Sandeep

a dev, an amateur photographer and a father

 

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: