mysql的replace函数

 

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

 

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

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

Thu Nov 12 17:15:44 2020

 

 

 

 

 

 

 

 

 

 

 

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

mysql的replace函数

上一篇:SQL数据源报表制作


下一篇:idea与mysql进行数据交互的出现中文乱码的解决方案