Postgresql里面内置了很多的实用函数,下面介绍切割函数:
介绍:
split_part(string text, delimiter text, field int)
Split string on delimiter and return the given field (counting from one)
1.找到name='9-76’行:

2.使用split_part()切割函数对按分隔符去取某个特定位置上的值:
位置是1时:

位置是2时:

说明 该函数对按分隔符去取某个特定位置上的值非常有效果。
本文详细介绍了PostgreSQL数据库中实用的切分函数split_part的使用方法,通过实例展示了如何利用该函数按分隔符获取字符串中特定位置的值,为数据处理提供高效解决方案。

3167

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



