The Relational Operators: =, <>, !=, ~=, <, >, <=, >= : Operators « PL SQL Operators « Oracle PL/SQL Tutorial






String comparisons are case-sensitive.

String comparisons are dependent on the character set being used.

String comparisons are affected by the underlying datatype.

Comparing two values as CHAR strings might yield different results than the same values compared as VARCHAR2 strings.

It's important to remember that Oracle dates contain a time component

True ExpressionsFalse Expressions
5 = 55 = 3
'AAAA' = 'AAAA''AAAA ' = 'AAAA'
5 != 35 <> 5
'AAAA ' ~= 'AAAA''AAAA' ~= 'AAAA'
10 < 20010.1 < 10.05
'Jeff' < 'Jenny''jeff' < 'Jeff'
TO_DATE('15-Nov-61' < '15-Nov-97')TO_DATE('1-Jan-97' < '1-Jan-96')
10.1 <= 10.110 <= 20
'A' <= 'B''B' <= 'A'
TO_DATE('1-Jan-97') <= TO_DATE('1-Jan-97)TO_DATE('15-Nov-61') <= TO_DATE('15-Nov-60)










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