Condition Syntax
|
Description
|
colname op DEFAULT
|
True if a column value compares correctly with the DEFAULT value for the column. Op can be =, <>, >=, >, <=, or <.
|
colname = USER
|
True if a column value equals the current user identifier.
|
item1 IS NULL
|
True if item1 has a null value. Item1 can be a column name, value, or expression. A null value cannot be used in a comparison with an operator.
|
item1 op item2
|
True if the relationship between two items is true as defined by an operator. Item1 can be a column name, value, or expression; item2 can be a column name, value, expression, or sub-SELECT statement.
|
COUNT=INSERT
|
Refers to the last row inserted by the current user, even if it has been modified by another user.
|
COUNT=LAST
|
Refers to the last row in a table. COUNT cannot be used with a view.
|
COUNT op value
|
Refers to a number of rows defined by op and value.
|
LIMIT=value
|
Specifies a number of rows affected by a command. A LIMIT condition should be the last condition in a WHERE clause.
|
EXISTS (sub-SELECT statement)
|
True if sub-SELECT statement returns one or more rows.
|
item1 BETWEEN item2 AND item3
|
True if the value of item1 is greater than or equal to the value of item2, and if the value of item1 is less than or equal to the value of item3.
|
colname LIKE 'string '
|
True if a column value equals the text string. With LIKE, a string can also be a DATE, TIME, or DATETIME value. The text string can contain R:BASE wildcard characters.
|
colname LIKE 'string ' ESCAPE 'chr '
|
True if a column value equals a text string. If you want to use a wildcard character as a text character in the string, specify the ESCAPE character 1chr. In the string, use chr in front of the wildcard character.
|
colname CONTAINS 'string '
|
True if a column value contains the text string.
|
colname SOUNDS 'string '
|
True if the soundex value of a column matches the soundex value of the text string.
|
item1 IN (vallist)
|
True if item1 is in the value list.
|
item1 IN (sub-SELECT statement)
|
True if item1 is in the rows selected by a sub-SELECT.
|
item1 op ALL (sub-SELECT statement)
|
True if the relationship between item1 and every row returned by a sub-SELECT statement matches an operator.
|
item1 op ANY(sub-SELECT statement)
|
True if the relationship between item1 and at least one value returned by a sub-SELECT statement matches an operator.
|
item1 op SOME (sub-SELECT statement)
|
ANY and SOME are equivalent.
|