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)}
| {[NOT] EXISTS subquery}
| {col [NOT] IN subquery} } ... .
Effect
Condition for the contents of col
columns behind the addition WHERE
in
Open SQL statements. Conditions
can be put in parentheses, linked with AND
and OR
, and negated with NOT
.
Additions
-
=|EQ|<>|NE|>|GT|<|LT|>=|GE|<=|LE
Relational operators: Column contents can be compared with the data objectsdobj
, with the contents of other columnscol2
, and 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 if the column contents lie in an interval. -
[NOT] LIKE dobj [ESCAPE esc]
Checks if the column contents match the pattern indobj
, although an escape character esc can be defined withESCAPE
for the wild card character "%" and "_". -
[NOT] IN (dobj1, dobj2 ...)
Checks if the column contents are contained in a value listdobj1 dobj2 ...
. -
[NOT] IN seltab
Checks if the column contents meet the conditions of a selection tableseltab
. -
IS [NOT] NULL
Checks if the column content has null value. -
(cond_syntax)
Dynamic entry of condition incond_syntax
. -
[NOT] EXISTS subquery
Checks the resulting set of the subquerysubquery
. -
col [NOT] IN subquery
Checks if the column contents are contained in the resulting set of the subquerysubquery
.