数据仓库服务 GaussDB(DWS)-字符处理函数和操作符:translate(string text, from text, to text)

时间:2025-02-12 15:05:09

translate(string text, from text, to text)

描述:把在string中包含的任何匹配from中字符的字符转化为对应的在to中的字符。如果from比to长,删掉在from中出现的额外的字符。

返回值类型:text

示例:

12345
SELECT translate('12345', '143', 'ax'); translate----------- a2x5(1 row)
support.huaweicloud.com/sqlreference-dws/dws_06_0030.html
提示

您即将访问非华为云网站,请注意账号财产安全