Delete Multi-point Duplicates from MySQL | ||
![]() Given a table like Our magic to this SQL starts with the Next, we use The last line of the Run a SQL command like the following to demonstrate to yourself that only the duplicates are selected. SELECT l.uid, l.resource FROM tx_example_domain_model_resourcelocalized l INNER JOIN tx_example_domain_model_resourcelocalized l2 ON l2.resource = l.resource WHERE l.lang = 2 AND l2.lang = l.lang AND l2.title = l.title AND l.uid > l2.uid ; Once happy with the results, run the SQL command again but using DELETE l FROM tx_example_domain_model_resourcelocalized l INNER JOIN tx_example_domain_model_resourcelocalized l2 ON l2.resource = l.resource WHERE l.lang = 2 AND l2.lang = l.lang AND l2.title = l.title AND l.uid > l2.uid ; The References
Related Entries | ||

