mysql的replace函数

将单引号与双引号的替换,有时候在json处理中需要:

dba@xxx ((none)) > select replace('xxxx"12345"677777','"',"'");
+---------------------------------------+
| replace('xxxx"12345"677777','"',"'") |
+---------------------------------------+
| xxxx'12345'677777                     |
+---------------------------------------+
1 row in set (0.07 sec)

Thu Nov 12 17:14:03 2020
dba@xxx ((none)) > select replace("xxxx'12345'677777","'",'"');
+---------------------------------------+
| replace("xxxx'12345'677777","'",'"') |
+---------------------------------------+
| xxxx"12345"677777                     |
+---------------------------------------+
1 row in set (0.07 sec)

Thu Nov 12 17:15:44 2020

###################################

原文地址:https://www.cnblogs.com/igoodful/p/13965238.html