oracle字符串相关处理

发布时间 2023-12-19 14:26:33作者: 一拾三夏

1.逗号替换成'逗号'

replace(xxx,',',''',''') 

2.字符串两天拼接单引号

'''' || replace(xxx,',',''',''') || ''''

 

select '''' || replace(col_name ,',',''',''') || '''' as col_name2 from t_pur_process where id='dcbaa4feb67b443588b0f6c58b181b69'