[简单]oracle在数字两旁添加' 字符

       有时候需要把1,2,3,4转换为'1','2','3','4',sql如下

      

select substr(regexp_replace(',&1', '(,)(\s*)([[:digit:]]+)(\s*)', '\1''\3'''),2) from dual    

 

     结果为:      
[简单]oracle在数字两旁添加' 字符_第1张图片
 
[简单]oracle在数字两旁添加' 字符_第2张图片
     全文完

 

你可能感兴趣的:(oracle)