&
(logical and)
The logical and operator (&
) returns
true if both arguments are true.
Syntax
X&Y
Input
Argument | Type | Description |
---|---|---|
X |
|
A scalar expression or column expression that evaluates to 0
or 1 |
Y |
|
A scalar expression or column expression that evaluates to 0
or 1 |
Return Value
Returns a boolean value of 1
or 0
corresponding to the
logical conjunction of X
and Y
.
If both X
and Y
are 1
, the result is
1
; otherwise, the result is 0
.
The data type of the result depends on the data type of the arguments.
- If both
X
andY
are integers, the result is integer. - If both
X
andY
are big integers, the result is big integer. - If one argument is big integer and the other is integer, the result is big integer.
If X
and/or Y
is N/A, the result is N/A.