Hi,
I am trying to do an update to a field, directory through Workbench as well as .NET using the MySQL Drivers for something like :
Update MyTable SET MyField='W ' WHERE ID=12
So I am trying to updating a field with the letter W and a space.
When I go to retrieve it via a SELECT using workbench or .NET, I am just getting 'W' - no space. Its like it is automatically trimming the field!
Even if I trail with 5 spaces - it still returns a length of 1, not 6 using
SELECT Length(MyField) FROM MyTable WHERE ID=12
If I pad with spaces to the left of the W, the string remains intact so its only trimming from the right. I dont want it to trim at all!
Its a Char(200) utf8mb4 field.
Any help would be great. Thanks in advance.
What I have tried:
Adding more spaces, post and pre the character. Googling for a reason, but no one else seems to having this issue, which I do not believe. Maybe I am using the wrong terminology in locating the answer but its driving me nuts!
Using a Medium Text (and I presume Long text, but definitely Medium Text, not just Char) the space is stored and retrieved.