当前位置:网站首页>Gbase 8C bit string operator (I)
Gbase 8C bit string operator (I)
2022-07-24 00:16:00 【Dazhuang twelve】
Bit string operator
In addition to the commonly used comparison operators , You can also use the following operators .&,| and # The bit string operands of must be equal in length . In displacement , Keep the original bit string length ( And 0 fill ).
- ||
describe : Connect between bit strings . Example :
gbase=# SELECT B'10001' || B'011' AS RESULT;
result
----------
10001011
(1 row)
Single field internal continuous connection operation is not recommended to exceed 180 Time . If exceeded 180 Time , It needs to be split into multiple contiguous strings , Then perform the connection operation between them . for example :str1||str2||str3||str4 Split into (str1||str2)||(str3||str4).
- &
describe : Between bit strings “ And ” operation . Example :
gbase=# SELECT B'10001' & B'01101' AS RESULT;
result
--------
00001
(1 row)
- |
describe : Between bit strings “ or ” operation . Example :
gbase=# SELECT B'10001' | B'01101' AS RESULT;
result
--------
11101
(1 row)
- #
describe : If the bit strings are inconsistent “ or ” operation . If the corresponding position in both bit strings is 1 Or, the position returns 0. Example :
gbase=# SELECT B'10001' # B'01101' AS RESULT;
result
--------
11100
(1 row)
- ~
describe : Between bit strings “ Not ” operation . Example :
gbase=# SELECT ~B'10001'AS RESULT;
result
----------
01110
(1 row)
- <<
describe : Shift the bit string to the left . Example :
gbase=# SELECT B'10001' << 3 AS RESULT;
result
----------
01000
(1 row)
- >>
describe : Shift the bit string to the right . Example :
gbase=# SELECT B'10001' >> 2 AS RESULT;
result
----------
00100
(1 row)
边栏推荐
- [translation] Introduction to go RPC: Hello World
- 进步成长的快乐
- 在原生终端实现类似 rz、sz 上传下载文件与目录的功能
- Multi table query_ External connection
- After openfeign sets circuitbreaker=true, feign's readtimeout expires
- Linked list - 206. Reverse linked list (this question is very important)
- Tencent cloud was affirmed by international professional streaming media evaluation: video coding performance is the best in all three scenarios
- GBase 8c系统表信息函数(三)
- paypal订阅流程及api请求
- Redis分布式锁待续
猜你喜欢

Docker builds sonarqube, mysql5.7 environment

Take stock of 10 new layer1 to prepare for the next bull market

Deep learning 9 feedforward neural network 2: realize feedforward neural network and model optimization

Nacos

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

盘点为下个牛市做准备的10个新Layer1

English语法_指示代词 - So

Application of encryption technology

Space shooting lesson 08: improved collision
![[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
随机推荐
太空射击 第07课: 添加图形
Adaptation scheme of large screen visualization
Write all the code as soon as you change the test steps? Why not try yaml to realize data-driven?
Redis 主从、哨兵、集群架构有缺点比较
JMeter中的自动转义处理
子矩阵的和
Tencent will close the "magic core". Is there any resistance to the development of digital collections?
mysql数据库基础
pytorch中with torch.no_grad(): && model.eval()
docker搭建sonarqube,mysql5.7环境
NGFW portal authentication experiment
进步成长的快乐
Single target tracking - [correlation filtering] mosse:visual object tracking using adaptive correlation filters
单目标追踪——【相关滤波】MOSSE:Visual Object Tracking using Adaptive Correlation Filters
GBase 8c 访问权限查询函数(二)
Deep learning 9 feedforward neural network 2: realize feedforward neural network and model optimization
二叉搜索树的简易实现及剖析
What are blue-green deployment, Canary release and a/b test
GBase 8c 会话信息函数(六)
STL案例-评委打分