当前位置:网站首页>GBase8s数据库select子句1
GBase8s数据库select子句1
2022-06-09 20:44:00 【爱吃萝卜冰冰凉】
WHERE 子句为 GBase 8s 扩展连接指定连接条件,为符合 ANSI 的连接指定后连接过滤器,和对
数据指定搜索条件;
在 WHERE 子句中使用条件
在 WHERE 子句中,您可使用这些简单的条件或比较:
关系运算符条件
IN 或 BETWEEN . . . AND
IS NULL 或 IS NOT NULL
LIKE 或 MATCHES
您还可在 WHERE 子句中使用 SELECT 语句;这称为子查询。在子查询中,下列 WHERE 子句
运算符是有效的:
IN 或 EXISTS
ALL、ANY 或 SOME
要获取更多信息,请参阅 条件。
在 WHERE 子句中,聚集函数不是有效的,除非它是子查询的一部分,或是来源自父查询的相关
的列上,且 WHERE 子句在 HAVING 子句之内的子查询中。
关系运算符条件
如果关系运算符的每一边的表达式满足该表达式指定的关系,则关系运算符条件是满足的。下列语
句使用大于(
)和等于(
=)关系运算符:
SELECT order_num FROM orders
WHERE order_date > ‘6/04/08’;
SELECT fname, lname, company
FROM customer
WHERE city[1,3] = ‘San’;
‘San’ 需要加上单引号,因为该子字符串来自字符列。请参阅 关系运算符条件。
WHERE 子句中的空格字符串和空字符串
对于 LVARCHAR、NVARCHAR 或 VARCHAR 列,指定列值等于空字符串的带有 WHERE 子
句的查询(
WHERE varlength_col = ‘’
)返回的结果集,与其中的 WHERE 子句指定等于空格(ASCII 32)字符的字符串的同一查询是
一样的
例如,如果 varlength_col 是类型 VARCHAR、NVARCHAR 或 LVARCHAR,则下列
WHERE 子句示例在功能上完全等同于指定等于空字符串的 WHERE 子句:
WHERE varlength_col = ’ ’
WHERE varlength_col = ’ ’
WHERE varlength_col = ’ ’
因此,对于内建的可变长度字符数据类型,在空字符串与全由一个或多个空白字符组成的字符串之
间,没有区别。(然而,请注意,查询过滤器
WHERE varlength_col IS NULL
不等同于先前的 WHERE 子句示例,且如果 varlength_col 值为 NULL,则返回一个不同的
结果集
边栏推荐
- Kubernetes native cicd:tekton Hello World
- C # on the application of polymorphism
- Learn to use PHP to implement unlimited comments and unlimited to secondary comments solutions
- 分享 4 种 JS 深拷贝的方法
- 分享 10 个关于 Reduce 函数的使用小技巧
- [tgowt] cmake to Ninja construction
- pyQt QWidget禁止非当前窗口的操作
- Integer ordered array lookup -- traversal and half / bisection
- Mr. wuyaohui, the world pioneer of ordinary ternary logic mathematics, announced the scientific research achievements of all truth tables of ordinary ternary logic mathematics to the world (Wu's law)
- Problems and solutions of HMI online download failure
猜你喜欢

ClickHouse 数据插入、更新与删除操作 SQL

搭建ngrok服务器,实现内网穿透服务,实现外网到内网的在线访问

Neo4j桌面版數據庫備份

The processor of this virtual machine supports different functions than the processor of the virtual machine that holds the state of the virtual machine

Neo4j桌面版数据库备份

VFP在64位win10环境下访问oracle出现的问题及解决方案

Problems and solutions of VFP accessing Oracle under 64 bit win10 environment

深夜小酌,50道经典SQL题,真香~

Pan micro oa9 foreground unlimited getshell

Clickhouse data insert, update and delete SQL
随机推荐
Ceisum 3D scene demo
Pan micro oa9 foreground unlimited getshell
Export CSV file from neo4j diagram database
Mysql异常:The server time zone value‘XXX'解决
刚学嵌入式,想问问什么是中断,中断的概念是什么
UTM to latitude and longitude
编程题:统计字符串中出现次数最多的字母
HMI 联机下载失败的问题及解决方案
C#关于抽象类的学习
C#中的泛型T的应用
Le navigateur ne peut pas ouvrir Baidu, d'autres peuvent être ouverts normalement
KubeVirt CICD Tekton (2) - task run:datavolume & ssh-key
学习使用php实现无限极评论和无限极转二级评论解决方案
C#关于多态的应用
dump. Pcapng packet parsing
Sauvegarde de la base de données neo4j Desktop
加密狗驱动解决方案
VFP在64位win10环境下访问oracle出现的问题及解决方案
[MySQL] principle and construction of master-slave replication
Some small details of C for loop