Home > Back-end >  How to remove these "special characters" from MySQL results?
How to remove these "special characters" from MySQL results?

Time:08-31

In the database I'm using, some of the pieces are formatted like this

S    1    A    1    

Is there any function to remove the characters and format my result as just

S1A1 

to clean this up? Notepad shows the characters are SOH (Start of Header). Thanks!!

CodePudding user response:

SOH is ASCII code 1, so you can use

REPLACE(columnname, CHAR(1), '')

to remove them from the value.

  • Related