比较运算符

17 Mar 2025 | 阅读 2 分钟

在 Oracle 中,比较运算符与 where 子句一起使用。可以使用以下运算符:

比较运算符描述
=Equal
<>不等于
!=不等于
>大于
>=大于或等于
<小于
<=小于或等于

Oracle Comparison operators

示例:等于运算符

在 Oracle 中,等于 (=) 运算符用于检查相等性。

查询: select * from table1 where age = 26

Oracle Comparison operators

示例:不等于运算符

在 Oracle 中,不等于运算符用于检查不等性。 != 或 <> 可用于在查询中检查不等性。

查询: select * from table1 where age <> 26

Oracle Comparison operators

查询: select * from table1 where age != 26

Oracle Comparison operators

示例:大于运算符

在 Oracle 中,大于 (>) 运算符用于获取给定表达式的更大值。

查询: select * from table1 where age > 26

Oracle Comparison operators

示例:大于或等于运算符

在 Oracle 中,大于或等于 (>=) 运算符用于获取给定表达式的大于或等于值。

查询: select * from table1 where age > = 26

Oracle Comparison operators

示例:小于运算符

在 Oracle 中,小于 (<) 运算符用于获取给定表达式的更小值。

查询: select * from table1 where age < 26

Oracle Comparison operators

示例:小于或等于运算符

在 Oracle 中,小于或等于 (<=) 运算符用于获取给定表达式的小于或等于值。

查询: select * from table1 where age <= 26

Oracle Comparison operators
下一个主题DELETE