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
###################################
    igoodful@qq.com
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号