当前位置:网站首页>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)
边栏推荐
猜你喜欢

YOLOv1

Xmind用例导入到TAPD的方案(附代码)

Y75. Chapter IV Prometheus factory monitoring system and practice -- Prometheus alarm setting (VI)
![[wechat applet] design and interactive implementation of auction product details page (including countdown and real-time update of bids)](/img/b5/dd4316b83ef4b80c36b532de658bb2.png)
[wechat applet] design and interactive implementation of auction product details page (including countdown and real-time update of bids)

理解多态,让不同的“人”做同一件事情会产生不同的结果

The name in Qiankun subapplication package.json becomes the default path

蓝绿部署、金丝雀发布、A/B测试是什么

深度学习之 9 前馈神经网络 基本概念
![[attack and defense world web] difficulty five-star 15 point advanced question: bug](/img/24/4a7f074aac9a08130cf215f0c39b57.png)
[attack and defense world web] difficulty five-star 15 point advanced question: bug

jenkins下使用声明式(Declarative)和Jenkinsfile的方式构建Pipeline流水线项目
随机推荐
ESP8266————AT指令+网络透传
GBase 8c 模式可见性查询函数(一)
深度学习之 9 前馈神经网络 基本概念
二叉搜索树的简易实现及剖析
[wechat applet] design and interactive implementation of auction product details page (including countdown and real-time update of bids)
paypal订阅流程及api请求
Intel Intel realsense realistic depth camera self calibration operation steps explanation D400 series is applicable
473-82(40、662、31、98、189)
sed 深入理解与使用
jenkins下使用声明式(Declarative)和Jenkinsfile的方式构建Pipeline流水线项目
474-82(8、221、300)
Pytest interface automation testing framework | multi process running case
Splicing of.Net distribution with outlook mail format and table
Solution to the second game of 2022 Niuke multi school league
As a programmer, is there anything you want to say to the newcomer?
mysql数据库基础
Delete all data of specified query criteria in Oracle
The differences between text and image drawing, data storage, localstorage, sessionstorage, and cookies
链表——707. 设计链表
链表——206. 反转链表(这题很重要)