-- 截取指定字符最后出现的前半部分
select reverse(substr(reverse('/C107341723B_145404/01/0_20220802_145505552.jpg'),position('/' in reverse('/C107341723B_145404/01/0_20220802_145505552.jpg'))+1)) as "before"
-- 截取指定字符最后出现的后半部分
SELECT split_part('/C107341723B_145404/01/0_20220802_145505552.jpg', '/', length(replace('/C107341723B_145404/01/0_20220802_145505552.jpg', '/', '--')) - length('/C107341723B_145404/01/0_20220802_145505552.jpg') +1) as "after"
搜索
复制
标签:C107341723B,20220802,01,截取,前半部,jpg,pgsql,145404,145505552 From: https://www.cnblogs.com/myself1012/p/16618711.html