column uniqueness that trim's trailing whitespace?
I currently have a table with 3 columns required for uniqueness, using the following:
UNIQUE KEY `transDate_desc_amount` (`transaction_date`,`description`,`amount`)
The issue I am finding is that some of the "description" column data has snuck into the database with trailing white space. Hence I'm wondering whether a good way to avoid duplicates being created is to have the constraint know about ignoring white space?
Do you know if this is possible?
e.g. something like UNIQUE KEY `transDate_desc_amount` (`transaction_date`,TRIM(`description`),`amount`)