sql (query) checking for duplicate record on duplicate columns
ok this is my data in the table
field1 field2 field 3 field4
107 0 2011-01-01 00:00:00.000 2613
107 0 2011-01-01 00:00:00.000 2613
how can i check for all the duplicate records in开发者_如何学Go the table with this dataset in the query.
select field1, field2, field3, field4, count(*)
from mytable
group by 1,2,3,4
having count(*) > 1;
精彩评论