T-SQL Tutorial

T-SQL Logical Operators


OperatorMeaning
ALLTRUE if all of a set of comparisons are TRUE.
ANDTRUE if both expressions are TRUE.
ANYTRUE if any one of a set of comparisons are TRUE.
BETWEENTRUE if the operand is within the range of comparisons.
EXISTSTRUE if a subquery contains any rows.
INTRUE if the operand is equal to one of a list of expressions.
LIKETRUE if the operand matches a pattern.
NOTReverses the value of any other operator.
ORTRUE if either expression is TRUE.
SOMETRUE if some of a set of comparisons are TRUE.