sql - Duplicate MySQL rows -
i write query pick out rows same cottageid, from, , values, in case pick out rows id 991, , 992. table name datesbooked.

you can join table itself:
select d1.id,d2.id datesbooked d1 inner join datesbooked d2 on d1.cottageid=d2.cottageid , d1.from = d2.from , d1.to = d2.to , d1.id<d2.id that give duplicates. getting ones have lesser id following 1 (that way duplicates in right column, , originals in first one)
Comments
Post a Comment