And operator
Two expressions are logically "and" operations.
result = expression1 And expression2
Parameters
Result
Any numeric variable.
Expression1
An arbitrary expression.
Expression2
An arbitrary expression.
Description
If and only if all two expressions are true, result is true. If any of the expressions are false, result is false. The following table shows how to determine result:
If expression1 is |
and Expression2 is |
The result is |
True |
True |
True |
True |
False |
False |
True |
Null |
Null |
False |
True |
False |
False |
False |
False |
False |
Null |
False |
Null |
True |
Null |
Null |
False |
False |
Null |
Null |
Null |
The AND operator also performs a bitwise comparison of the identically positioned bits in two numeric expressions and sets the corresponding bit in result according to the following table:
such as the bit in the expression1 is |
and the bit in the expression2 is |
The result is |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |