I'm curious if joining tables on string fields should be done with the string fields being trimmed?
Let's say you have two identical strings in two different tables. You want to join the two tables on those two strings. So you will do something like this:
SELECT *
FROM table_primary
LEFT
JOIN table_seconday
ON table_primary.string_one = table_seconday.string_two
My questions is, even though the strings are identical, should the string fields first be trimmed, and then compared with each other?
Are there best practices when joining on strings, or it's the usual comparison as with joining on integers?