Logical operators
operators #tsql#operators
Boolean
Operator
Meaning
Logical operators test for the truth of some condition. Logical operators, like comparison
operators, return a
data type with a value of
,
, or.
ALL
if all of a set of comparisons are.
AND
if both Boolean expressions are.
ANY
if any one of a set of comparisons are.
BETWEEN
if the operand is within a range.
EXISTS
if a subquery contains any rows.
IN
if the operand is equal to one of a list of expressions.
LIKE
if the operand matches a pattern.
NOT
Reverses the value of any other Boolean operator.
OR
if either Boolean expression is.
SOME | ANY
if some of a set of comparisons are.
Operator precedence (Transact-SQL)
Expand table