PostgreSQL substring()函数

来源:互联网 发布:openstack 五个网络 编辑:程序博客网 时间:2024/05/24 06:31

substring(string [from int] [for int])text抽取子字串 substring('Thomas' from 2 for 3)homsubstring(string from pattern)text抽取匹配 POSIX 正则表达式的子字串 substring('Thomas' from '...$')massubstring(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

原创粉丝点击