vivek kumar singh vivek kumar singh - 1 year ago 62
MySQL Question

How to replace escape character with a string

I am trying to replace escape character with a string but the query is giving me an irrelevant result

eg- char- '\' replace with 'adfc' with below query

SELECT REPLACE("abcdefgh\i","\\", "adfc" );

output - abcdefghi

Desired output - abcdefghadfci

How can i achieve this in mysql?

Answer Source

in your my.ini add this line:


then restart your mysql server, and replace your query with this:

SELECT REPLACE("abcdefgh\i","\", "adfc" );

reference here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download