2023-01-12
PostgreSQL starts_with() 函数如何使用?
PostgreSQL starts_with() 函数如何使用?
我来答
添加附件
收藏
分享
问题补充
3条回答
默认
最新
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
墨值悬赏
PostgreSQL starts_with() 函数如何使用?
PostgreSQL starts_with() 函数检查一个字符串是否以一个指定的前缀开头。
starts_with() 语法这里是 PostgreSQL starts_with() 函数的语法:
starts_with(string, prefix)
stringprefix如果字符串 string 以指定的前缀 prefix 开头, starts_with() 函数返回 true (t),否则返回 false (f)。
starts_with() 示例这个示例演示了如何使用 starts_with() 检查一个字符串是否拥有指定的前缀:
SELECT starts_with('HelloWorld', 'Hello');
starts_with
-------------
t这里,HelloWorld 以 Hello 开头,因此 starts_with('HelloWorld', 'Hello') 返回了 t。
SELECT starts_with('HelloWorld', 'World');
starts_with
-------------
f这里,HelloWorld 不以 World 开头,因此 starts_with('HelloWorld', 'Hello') 返回了 f。
评论
有用 5
PostgreSQL starts_with() 函数检查一个字符串是否以一个指定的前缀开头。
评论
有用 3
墨值悬赏