ABAP Keyword Documentation → ABAP − Short Reference
sql_cond - Short Reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
... { {col1 {=|EQ|<>|NE|>|GT|<|LT|>=|GE|<=|LE}
{ {dobj}
| {col2}
| {[ALL|ANY|SOME] subquery} }}
| {col [NOT] BETWEEN dobj1 AND dobj2}
| {col [NOT] LIKE dobj [ESCAPE esc]}
| {col [NOT] IN (dobj1, dobj2 ...)}
| {col [NOT] IN seltab}
| {col IS [NOT] NULL}
| {(cond_syntax)}
| {EXISTS subquery}
| {col [NOT] IN subquery} } ...
Effect
Condition for the content of columns col
behind the addition WHERE
in
Open SQL statements. Conditions
can be put in parentheses explicitly, joined using AND
and OR
, and negated using NOT
.
Additions
-
=|EQ|<>|NE|>|GT|<|LT|>=|GE|<=|LE
Relational operators: Column content can be compared with the data objectsdobj
, with the content of other columnscol2
, and with the results of a subquerysubquery
. -
ALL|ANY|SOME
Must be specified when the results of the subquerysubquery
has more than one line. -
[NOT] BETWEEN
Checks whether the column content is in an interval. -
[NOT] LIKE dobj [ESCAPE esc]
Checks whether the column content matches the pattern indobj
, although an escape character esc can be defined withESCAPE
for the wild card character "%" and "_". -
[NOT] IN (dobj1, dobj2 ...)
Checks whether the column content is in a value listdobj1 dobj2 ...
. -
[NOT] IN seltab
Checks whether the column content meets the conditions of a selection tableseltab
. -
IS [NOT] NULL
Checks whether the column content has the null value. -
(cond_syntax)
Condition incond_syntax
specified dynamically. -
EXISTS subquery
Checks the resulting set of the subquerysubquery
. -
col [NOT] IN subquery
Checks whether the column content are in the results set of the subquerysubquery
.