Comparison Operators : Operators « PL SQL Operators « Oracle PL/SQL Tutorial






Comparison operators are used to compare one value or expression to another.

All comparison operators return a boolean result.

OperatorExampleUsage
=IF A = B THENThe equality operator.
<>IF A <> B THENThe inequality operator.
!=IF A != B THENAnother inequality operator, synonymous with <>.
~=IF A ~= B THENAnother inequality operator, synonymous with <>.
<IF A < B THENThe less than operator.
>IF A > B THENThe greater than operator.
<=IF A <= B THENThe less than or equal to operator.
>=IF A >= B THENThe greater than or equal to operator.
LIKEIF A LIKE B THENThe pattern-matching operator.
BETWEENIF A BETWEEN B AND C THENChecks to see if a value lies within a specified range of values.
INIF A IN (B,C,D) THENChecks to see if a value lies within a specified list of values.
IS NULLIF A IS NULL THENChecks to see if a value is null.










23.1.Operators
23.1.1.Operators
23.1.2.The basic arithmetic operators in action
23.1.3.Logical Operators in PL/SQL
23.1.4.Running Anonymous Blocks of Code
23.1.5.Arithmetic Operators
23.1.6.Exponentiation
23.1.7.The negation and identity operators in action.
23.1.8.Comparison Operators
23.1.9.The Relational Operators: =, <>, !=, ~=, <, >, <=, >=
23.1.10.Logical Operators
23.1.11.String Operators
23.1.12.Use of Comparison Operators with Strings