Over a million developers have joined DZone.

Find Duplicate records in SQL table

· Database Zone

Speed up your development and test cycles with fully automated data delivery, view a 10 minute demo, brought to you in partnership with Delphix.

U might have come across a situation like there are number of duplicated records in a table.

Now Its Ur duty to remove duplicacy of data from the table, So the first step would be to find out duplicate records against each column.

Suppose our tablename is masterorder with column orderid for which we are goin to find duplicate records.
SELECT orderid, COUNT(*) TotalCount
FROM masterorder
GROUP BY orderid

Learn how test data on demand can lead to faster application development, read the IDC white paper, brought to you in partnership with Delphix.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}