the percent signs are wildcard characters, and they are used only with LIKE
the reason for adding that particular condition to the WHERE clause is to avoid attempting to update rows which don't include the non-breaking space
according to the manual...
Quote:
|
If you set a column to the value it currently has, MySQL notices this and doesn't update it.
|
so if a certain row has a column value which doesn't contain the non-breaking space, then REPLACE(column_name,' ',' ') doesn't actually replace anything, so the result of the REPLACE function is the same as what the column value originally was, and mysql apparently doesn't actually perform the update -- note that if it did go ahead and perform the update anyway, it would simply set the value to what it originally was
so i add the condition to circumvent not only the non-updating of a value to itelf, but also the unnecessary checking, which will speed up the query