当前位置:网站首页>Gbase8s database select Clause 1
Gbase8s database select Clause 1
2022-06-09 20:55:00 【Like to eat radish ice cold】
WHERE The clause is GBase 8s Extended connection specifies the connection condition , To conform to ANSI After specifying the connection filter , And for
Data specify search criteria ;
stay WHERE Use condition in Clause
stay WHERE clause , You can use these simple conditions or compare :
Relational operator conditions
IN or BETWEEN . . . AND
IS NULL or IS NOT NULL
LIKE or MATCHES
You can also visit WHERE Used in clauses SELECT sentence ; This is called a subquery . In subquery , The following WHERE Clause
The operator is valid :
IN or EXISTS
ALL、ANY or SOME
For more information , see also Conditions .
stay WHERE clause , The aggregate function is not valid , Unless it is part of a subquery , Or from the parent query
On the list of , And WHERE Clause in HAVING In a subquery within a clause .
Relational operator conditions
If the expression on each side of the relational operator satisfies the relationship specified by the expression , Then the relational operator condition is satisfied . The following words
Sentence use is greater than (
) And equal to (
=) Relational operator :
SELECT order_num FROM orders
WHERE order_date > ‘6/04/08’;
SELECT fname, lname, company
FROM customer
WHERE city[1,3] = ‘San’;
‘San’ You need to put single quotes , Because the substring comes from the character column . see also Relational operator conditions .
WHERE Space string and empty string in clause
about LVARCHAR、NVARCHAR or VARCHAR Column , Specifies that the column value is equal to an empty string with WHERE Son
Query of sentence (
WHERE varlength_col = ‘’
) The result set returned , And among them WHERE Clause specifies equal to space (ASCII 32) The same query for character strings is
Same
for example , If varlength_col It's the type VARCHAR、NVARCHAR or LVARCHAR, Then
WHERE The clause example is functionally identical to specifying an equal to an empty string WHERE Clause :
WHERE varlength_col = ’ ’
WHERE varlength_col = ’ ’
WHERE varlength_col = ’ ’
therefore , For built-in variable length character data types , Between an empty string and a string consisting entirely of one or more white space characters
between , There is no difference between .( However , Please note that , Query filter
WHERE varlength_col IS NULL
Not equivalent to the previous WHERE Example of clause , And if varlength_col The value is NULL, Returns a different
Result set
边栏推荐
- Make money by doing sideline work. These popular we media platforms have made a lot of profits
- 分享 4 种 JS 深拷贝的方法
- 部署 cinder-csi-plugin 遇到的几个问题
- LeetCode 526. 优美的排列***
- KubeVirt CICD Tekton (2) - task run:datavolume & ssh-key
- Role of C random
- 加密狗驱动解决方案
- KubeVirt网络源码分析(3)- 虚拟机热迁移网络
- Parsing fluent from source code_ Precise local refresh of Redux
- GBase8s数据库select子句4
猜你喜欢
随机推荐
Application of commission in C #
Ceisum 3D scene demo
Analysis of source code data anti leakage solution
C#中String的知识点
DataFrame合并
KubeVirt网络源码分析(3)- 虚拟机热迁移网络
dump. Pcapng packet parsing
C # learning about abstract classes
CompareTo和compare的区别
numpy中的ndarry排序
力扣84-柱状图中最大的矩形(单调栈)
为什么要重写equals和hashcode?
Some problems encountered in deploying cinder CSI plugin
二叉搜索树
【运维有小邓】AD域文件权限管理
739. 每日温度 - 力扣(单调递减栈)
每日一题——leecode59( 螺旋矩阵 II)
C # on the application of polymorphism
Usage of memberwiseclone in C #
Chief architect of Huawei cloud stack: create a "hands-on" digital tool and answer the necessary topic of government enterprise IT digital transformation








