I have an already existing table with a field that should be unique but is not. I only know this because an entry was made into the table that had the same value as another, already existing, entry and this caused problems.
How do I make this field only accept unique values?
For MySQL 5.7.4 or later:
So, make sure to remove duplicate entries first as IGNORE keyword is no longer supported.
Reference