Export (0) Print
Expand All
Expand Minimize

AND (Transact-SQL)

Combines two Boolean expressions and returns TRUE when both expressions are TRUE. When more than one logical operator is used in a statement, the AND operators are evaluated first. You can change the order of evaluation by using parentheses.

Topic link icon Transact-SQL Syntax Conventions


boolean_expression AND boolean_expression

boolean_expression

Is any valid expression that returns a Boolean value: TRUE, FALSE, or UNKNOWN.

The following chart shows the outcomes when you compare TRUE and FALSE values by using the AND operator.

  TRUE FALSE UNKNOWN

TRUE

TRUE

FALSE

UNKNOWN

FALSE

FALSE

FALSE

FALSE

UNKNOWN

UNKNOWN

FALSE

UNKNOWN

Boolean

Returns TRUE when both expressions are TRUE.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft