"Key column information is insufficient or incorrect. Too many rows were
affected by update."
So how is the trick to remove this duplication?
I was searching and finally found something.
here's what we can do:
1. find out which are the duplicate records
SELECT col1, col2, count(*)
FROM t1
GROUP BY col1, col2
HAVING count(*) > 1
2. delete the duplicate by using this sql
set rowcount 1
delete from t1
where col1=1 and col2=1
it works!
Reference: here
No comments:
Post a Comment