AND (SQL Server Compact)
Combines two Boolean expressions and returns TRUE when both expressions are TRUE. When more than one logical operator is used in a statement, AND operators are evaluated first. You can change the order of evaluation by using parentheses.
Syntax
Boolean_expression AND boolean_expression
Arguments
- Boolean_expression
Any valid expression in SQL Server Compact that returns a Boolean value: TRUE, FALSE, or UNKNOWN.
Result Types
bit
Return Value
Returns TRUE when both expressions are TRUE.
Example
The following example uses AND to obtain the total cost of a specific order for a particular product.
SELECT [Unit Price] * Quantity AS "Total Cost" FROM "Order Details" WHERE [Product ID] = '11' AND [Order ID] = '10248'