PostgreSQL substring()函数

前端之家收集整理的这篇文章主要介绍了PostgreSQL substring()函数前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

猜你在找的Postgre SQL相关文章