My contemplations and diurnal novelties are publicized here

Archive for July, 2011

How to find duplicate records in a table


Consider table “tbl_dispatchreport” is having duplicate record in the column drcode

We can use group by with having to find the duplicate rows

select count(drcode),drcode from tbl_dispatchreport

group by drcode

having count(drcode) > 1

%d bloggers like this: