There is always the possibility that the users may not enter the values as we expected and the data is being saved on the Database table. E.g. unwanted whitespace or characters with the value.
You will see the issue when you check for duplicate records or sort the list.
MySQL have some string functions that you can use to eliminate the extra space or characters from the field.