EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Like Conditions

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 SQL Language Elements
241
...
expr
[ NOT ] BETWEEN
start-expr
AND
end-expr
The BETWEEN condition can evaluate as TRUE, FALSE, or UNKNOWN.
Without the NOT keyword, the condition evaluates as TRUE if expr is
between start-expr and end-expr. The NOT keyword reverses the meaning of
the condition but leaves UNKNOWN unchanged.
The BETWEEN conditions is equivalent to a combination of two
inequalities:
expr
>=
start-expr
AND
expr
<=
end-expr
The BETWEEN condition is compatible between Adaptive Server
Anywhere and Adaptive Server Enterprise.
LIKE conditions
The syntax for LIKE conditions is as follows:
...
expression
[NOT] LIKE
pattern
[ESCAPE
escape-expr
]
The LIKE condition can evaluate as TRUE, FALSE, or UNKNOWN.
Without the NOT keyword, the condition evaluates as TRUE if expression
matches the pattern. If either expression or pattern is the NULL value, this
condition is UNKNOWN. The NOT keyword reverses the meaning of the
condition, but leaves UNKNOWN unchanged.
The pattern may contain any number of wild cards. The wild cards are:
Wild card Matches
_ (underscore) Any one character
% (percent) Any string of zero or more characters
[] Any single character in the specified range or set
[^] Any single character not in the specified range or set
All other characters must match exactly.
For example, the search condition
... name LIKE ’a%b_’
is TRUE for any row where name starts with the letter a and has the letter b
as its second last character.
Compatibility

Table of Contents

Related product manuals