substring(string [from int] [for int]) | text | 抽取子字串 | substring('Thomas' from 2 for 3) | hom |
substring (string from pattern) |
text | 抽取匹配 POSIX 正则表达式的子字串 | substring('Thomas' from '...$') | mas |
substring (string from pattern for escape) |
text | 抽取匹配sql正则表达式的子字串 | substring('Thomas' from '%#"o_a#"_' for '#') | oma |
例子1.
SELECT id,substring(description from '{zh=([^}]+)/}') as description,type FROM t order by id limit 15 offset 0
原文链接:https://www.f2er.com/postgresql/197093.html