The table below lists all the SQL comparison operators supported by EBX®, along with their standard SQL syntax. Some operators may have optional parameters: they are surrounded by square brackets.
Operator syntax | Description and example(s) |
---|---|
value1 = value2 | Equals
|
value1 <> value2 | Not equals
|
value1 > value2 | Greater than
|
value1 >= value2 | Greater than or equal
|
value1 < value2 | Lower than
|
value1 <= value2 | Less than or equal
|
value IS NULL | Whether value is null
|
value IS NOT NULL | Whether value is not null
|
value1 IS DISTINCT FROM value2 | Whether two values are not equal, treating null values as the same
|
value1 IS NOT DISTINCT FROM value2 | Whether two values are equal, treating null values as the same
|
value1 BETWEEN value2 AND value3 | Whether value1 is greater than or equal to value2 and less than or equal to value3
|
value1 NOT BETWEEN value2 AND value3 | Whether value1 is greater than or equal to value2 and less than or equal to value3
|
string1 LIKE string2 | Whether string1 matches pattern string2. The wildcard '%' represent zero, one or multiple characters. To find if string1 starts with a sequence, use pattern 'sequence%'. The matching is case sensitive. To do a case insensitive matching, use UPPER (or LOWER) on string1 and pattern.
|
string1 NOT LIKE string2 | Whether string1 does not matches pattern string2. The wildcard '%' represent zero, one or multiple characters. To find if string1 does not start with a sequence, use pattern 'sequence%'. The matching is case sensitive. To do a case insensitive matching, use UPPER (por LOWER) on string1 and pattern.
|
value IN (value [, value]*) | Whether value is equal to a value in a list
|
value NOT IN (value [, value]*) | Whether value is not equal to every value in a list
|
value IN (sub-query) | Whether value is equal to a row returned by sub-query
|