The backslash is treated as an escape character . If there was no backslash, your line would end with Tom , and the remaining s things cause a syntax error.
\ tells MySQL not to treat escaped ' as a line separator, but to continue until the next unescaped ' is found.
This escape character is used for query purposes only and is not considered part of the string you want to update.
Like Alvin suggested in the comments, if you want to keep the backslash in your database, you have to add it by adding another escape-slash, i.e. \\ . This will make your request look like:
UPDATE `TABLE` SET `PERSONAL_BELONGINGS` = 'Tom\\\ things'
And the data in the database will look like this:
|Tom\ things|
You can read more about string literals and escape special characters in the MySQL Guide
However, it is worth noting that storing an already escaped string in the database is bad practice. You must take care of the evacuation of special characters in your code.
source share