| 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
本文深入探讨了使用SQL正则表达式进行字符串操作的技术,包括抽取匹配子字串的方法,并通过具体例子展示了如何在数据库查询中灵活运用这些技术。

7477

被折叠的 条评论
为什么被折叠?



