Logical Operators (Transact-SQL)
Logical operators test for the truth of some condition. Logical operators, like comparison operators, return a Boolean data type with a value of TRUE, FALSE, or UNKNOWN.
Operator |
Meaning |
---|---|
TRUE if all of a set of comparisons are TRUE. |
|
TRUE if both Boolean expressions are TRUE. |
|
TRUE if any one of a set of comparisons are TRUE. |
|
TRUE if the operand is within a range. |
|
TRUE if a subquery contains any rows. |
|
TRUE if the operand is equal to one of a list of expressions. |
|
TRUE if the operand matches a pattern. |
|
Reverses the value of any other Boolean operator. |
|
TRUE if either Boolean expression is TRUE. |
|
TRUE if some of a set of comparisons are TRUE. |
See Also