当前位置:网站首页>GBase 8c 字符串操作符
GBase 8c 字符串操作符
2022-07-24 00:16:00 【大壮十二】
GBase 8c 数据库提供一些字符串操作符,在这些函数里使用关键字而不是逗号来分隔参数。
- octet_length(string)
描述:二进制字符串中的字节数。返回值类型:int
示例:
gbase=# SELECT octet_length(E'jo\\000se'::bytea) AS RESULT;
result
--------
5
(1 row)
- overlay(string placing string from int [for int])
描述:替换子串。返回值类型:bytea
示例:
gbase=# SELECT overlay(E'Th\\000omas'::bytea placing E'\\002\\003'::bytea from 2 for 3) AS RESULT;
result
----------------
\x5402036d6173
(1 row)
- position(substring in string) 描述:特定子字符串的位置。返回值类型:int
示例:
gbase=# SELECT position(E'\\000om'::bytea in E'Th\\000omas'::bytea) AS RESULT;
result
--------
3
(1 row)
- substring(string [from int] [for int])
描述:截取子串。返回值类型:bytea
示例:
gbase=# SELECT substring(E'Th\\000omas'::bytea from 2 for 3) AS RESULT;
result
----------
\x68006f
(1 row)
- substr(string, from int [, for int])
描述:截取子串。返回值类型:bytea
示例:
gbase=# select substr(E'Th\\000omas'::bytea,2, 3) as result;
result
----------
\x68006f
(1 row)
- trim([both] bytes from string)
描述:从string的开头和结尾删除只包含bytes中字节的最长字符串。返回值类型:bytea
示例:
gbase=# SELECT trim(E'\\000'::bytea from E'\\000Tom\\000'::bytea) AS RESULT;
result
----------
\x546f6d
(1 row)
边栏推荐
- Mobile terminal H5 - a lifeline timeline
- Windows software: how to install mysql5.7 and configure environment variables
- 盘点为下个牛市做准备的10个新Layer1
- My meeting of OA project (query)
- Tencent will close the "magic core". Is there any resistance to the development of digital collections?
- Realize the function of uploading and downloading files and directories similar to RZ and SZ on the native terminal
- English语法_指示代词 -such / the same
- Codeforces Round #807 (Div. 2)(A-D)
- 一改测试步骤代码就全写?为什么不试试用 Yaml实现数据驱动?
- mysql数据库基础
猜你喜欢

Multi knapsack explanation of dynamic programming knapsack problem

473-82(40、662、31、98、189)

总结谋划明方向 凝心聚力开新局——和数软件对口援疆项目显成效

Inftnews | protect the "Snow Mountain Spirit", and the 42verse "digital ecological protection" public welfare project is about to start

分布式之 CAP 原则
![[translation] Introduction to go RPC: Hello World](/img/dd/7887f056bc031fe50253078dd355d0.png)
[translation] Introduction to go RPC: Hello World

Redis 主从、哨兵、集群架构有缺点比较

Beijing University qingniaochangping Campus: how about the current situation of operation and maintenance employment? Are skills required?

ESP8266————AT指令+网络透传

docker搭建sonarqube,mysql5.7环境
随机推荐
盘点为下个牛市做准备的10个新Layer1
kubernetes error
[opencv] - when the parameter type of cv.threshold() function is a number, what does it mean
kubernetes error
IT基础英语
Write all the code as soon as you change the test steps? Why not try yaml to realize data-driven?
ESP8266————AT指令+网络透传
logback
Tencent will close the "magic core". Is there any resistance to the development of digital collections?
Take stock of 10 new layer1 to prepare for the next bull market
2022年7月23日——mapper文件说明
蓝绿部署、金丝雀发布、A/B测试是什么
docker搭建sonarqube,mysql5.7环境
Structured streaming programming model (input table, result table, output mode...)
Nacos
【Android Kotlin】Property、Getter 和 Setter
jenkins下使用声明式(Declarative)和Jenkinsfile的方式构建Pipeline流水线项目
IIS deployment.Netcore
2022牛客多校联赛第二场 题解
GBase 8c模式可见性查询函数(二)