ALLBASE/SQL Reference Manual (36216-90216)

Chapter 9 265
Search Conditions
Comparison Predicate
Comparison Predicate
A comparison predicate compares two expressions using a comparison operator. The
predicate evaluates to TRUE if the first expression is related to the second expression as
specified in the comparison operator.
Scope
SQL Data Manipulation Statements
SQL Syntax
Expression
{ =
<>
>
>=
<
<=} [
Expression
SubQuery
]
Parameters
Expression
specifies a value used to identify columns, screen rows, or define new
column values. The syntax of expressions is defined in Chapter 8 ,
“Expressions.” Both numeric and non-numeric expressions are allowed in
comparison predicates. Predicates cannot include LONG columns.
SubQuery
is a QueryExpression whose result is used in evaluating another query.
The syntax of QueryExpression is presented in the description of the
SELECT statement.
= is equal to. A comparison predicate using = is also known as an EQUAL
predicate.
<> is not equal to.
> is greater than.
>= is greater than or equal to.
< is less than.
<= is less than or equal to.
Description
Character strings are compared according to the HP eight-bit ASCII collating sequence
for ASCII data, or the collation rules for the native language of the DBEnvironment for
NLS data. Column data would either be ASCII data or NLS data depending on how the
column was declared upon its creation. Constants are ASCII data or NLS data
depending on whether you are using NLS or not.
If a case insensitive ASCII expression is compared to a case insensitive NLS expression,