Transact-SQL Reference


SQL Server 2008 Books Online (October 2009)
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

Syntax

boolean_expression AND boolean_expression
Arguments

boolean_expression

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

Remarks

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

Result Types

Boolean

Result Value

Returns TRUE when both expressions are TRUE.

See Also

Reference

Functions (Transact-SQL)
Operators (Transact-SQL)
SELECT (Transact-SQL)
WHERE (Transact-SQL)

Other Resources

Logical Operators

Help and Information

Getting SQL Server 2008 Assistance
Tags :


Page view tracker