将单引号与双引号的替换,有时候在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

 

 

 

 

 

 

 

 

 

 

 

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

相关文章:

  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-05
  • 2022-02-11
  • 2022-02-24
猜你喜欢
  • 2021-09-15
  • 2021-11-12
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案