The string that i have to insert contain the 2 characters for string so i the command input is invalid. please check here: ibb.co/34SqNxv and see how i'm trying to insert the string " Contenuto1"' " bu since the string contain those special chaacters the command become invalid.
custom character for strings on mysql workbench
Hi,
i have a string that contains both characters ' and ", i need to use this strings inside an insert.
The problem is that due to those characters the strings results "splitted" therefore invalid.
Can i change the characters ' and " to some other characters?
3 answers
Sort by: Most helpful
-
-
Viorel 112.2K Reputation points
2021-09-27T15:54:21.62+00:00 Try using ' to write the strings and double each ' that appears inside the text. For example:
- 'a''b' — two ' between a and b denotes a single '.
The quotation mark (") can be written directly inside such strings.
-
YufeiShao-msft 7,056 Reputation points
2021-09-28T08:00:00.883+00:00 Hi @Mattia Cammalleri ,
SQL Server is really different from MySQL, I suggest you can go to a MySQL related for advice.
If you can try to replace the ‘ and “ with other characters in a MySQL column?
https://stackoverflow.com/questions/7734077/mysql-replace-character-in-columns