I have the table having duplicate entries against column
"image_url
" now i want to remove only duplicates and keep just one record of each?
here is my query i tried :
DELETE t1
FROM
ad_images_copy t1
JOIN ad_images_copy t2 ON t2.image_url = t1.image_url
AND t2.id < t1.id
reference link for remove duplicate rows
but it gave me the error
Error : Lock wait timeout exceeded; try restarting transaction
now i want to Limit this query because i have to much records.
i tried by adding limit
in last but it not work for me .
DELETE t1
FROM
ad_images_copy t1
JOIN ad_images_copy t2 ON t2.image_url = t1.image_url
AND t2.id < t1.id
limit 100 ;
help if any other way to do this.