当前位置:网站首页>Gbase 8C string operator
Gbase 8C string operator
2022-07-24 00:16:00 【Dazhuang twelve】
GBase 8c The database provides some string operators , Use keywords instead of commas to separate parameters in these functions .
- octet_length(string)
describe : Number of bytes in binary string . return type :int
Example :
gbase=# SELECT octet_length(E'jo\\000se'::bytea) AS RESULT;
result
--------
5
(1 row)
- overlay(string placing string from int [for int])
describe : Replace substring . return type :bytea
Example :
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) describe : Location of a specific substring . return type :int
Example :
gbase=# SELECT position(E'\\000om'::bytea in E'Th\\000omas'::bytea) AS RESULT;
result
--------
3
(1 row)
- substring(string [from int] [for int])
describe : Intercept substring . return type :bytea
Example :
gbase=# SELECT substring(E'Th\\000omas'::bytea from 2 for 3) AS RESULT;
result
----------
\x68006f
(1 row)
- substr(string, from int [, for int])
describe : Intercept substring . return type :bytea
Example :
gbase=# select substr(E'Th\\000omas'::bytea,2, 3) as result;
result
----------
\x68006f
(1 row)
- trim([both] bytes from string)
describe : from string The beginning and end of delete only contain bytes Longest string in bytes . return type :bytea
Example :
gbase=# SELECT trim(E'\\000'::bytea from E'\\000Tom\\000'::bytea) AS RESULT;
result
----------
\x546f6d
(1 row)
边栏推荐
猜你喜欢
随机推荐
高数_第2章多元函数微分学__偏导数的几何应用_空间曲线的切线与法平面
Single target tracking - [correlation filtering] mosse:visual object tracking using adaptive correlation filters
logback
文本和图片的绘制、数据存储、localStorage、sessionStorage、cookie三者的区别
GBase 8c 会话信息函数(一)
深度学习之 9 前馈神经网络2:实现前馈神经网络,模型调优
Linked list - 206. Reverse linked list (this question is very important)
My meeting of OA project (query)
GBase 8c访问权限查询函数(六)
Pytest interface automation test framework | summary
NGFW的Portal认证实验
As a programmer, is there anything you want to say to the newcomer?
C语言之字符串函数一
高数_第1章空间解析几何与向量代数__两点距
vulnhub wpwn: 1
Codeforces Round #807 (Div. 2)(A-D)
深度学习之 9 前馈神经网络 基本概念
尝试新的方法
C language explanation series -- understanding of functions (2) how to use functions to exchange the values of two integer variables
Redis分布式锁待续








