No, this is unacceptable.
Next SQL:
ALTER TABLE `table`
ADD UNIQUE (`column`)
Will generate the following error:
# 1062 - Duplicate the 'data' entry for the key column
You can identify duplicates using:
SELECT * FROM `table`
GROUP BY `column`
HAVING COUNT(`column`) > 1
After deleting all duplicates, you can add a restriction UNIQUE.
source
share