Table of operators
An operator is a sign or symbol that specifies the type of calculation to perform within an expression. There are mathematical, comparison, logical, and reference operators. Access supports a variety of operators, including arithmetic operators such as +, -, multiply (*), and divide (/), in addition to comparison operators for comparing values, text operators for concatenating text, and logical operators for determining true or false values. This article provides details about using these operators.
Note: Beginning in Access 2010, the Expression Builder has IntelliSense, so you can see what arguments your expression requires.
In this article
Arithmetic operators
You use the arithmetic operators to calculate a value from two or more numbers or to change the sign of a number from positive to negative or vice versa.
|
Comparison operators
You use the comparison operators to compare values and return a result that is True, False, or Null.
Operator | Purpose | Example |
< | Returns True if the first value is less than the second value. | Value1 < Value2 |
<= | Returns True if the first value is less than or equal to the second value. | Value1 <= Value2 |
> | Returns True if the first value is greater than the second value. | Value1 > Value2 |
>= | Returns True if the first value is greater than or equal to the second value. | Value1 >= Value2 |
= | Returns True if the first value is equal to the second value. | Value1 = Value2 |
<> | Returns True if the first value is not equal to the second value. | Value1 <> Value2 |
Note: In all cases, if either the first value or the second value is null, the result is then also null. Because null represents an unknown value, the result of any comparison with a null value is also unknown.
Logical operators
You use the logical operators to combine two Boolean values and return a true, false, or null result. Logical operators are also referred to as Boolean operators.
|
Concatenation operators
You use the concatenation operators to combine two text values into one.
|
Special operators
You use the special operators to return a True or False result as described in the following table.
|
No comments:
Post a Comment