|| (OR) (Entity SQL)
boolean_expression OR boolean_expression or boolean_expression || boolean_expression
Any valid expression that returns a
true when either of the conditions is
OR is an Entity SQL logical operator. It is used to combine two conditions. When more than one logical operator is used in a statement, OR operators are evaluated after AND operators. However, you can change the order of evaluation by using parentheses.
Double vertical bars (||) have the same functionality as the OR operator.
The following table shows possible input values and return types.
The following Entity SQL query uses the OR operator to combine two
Boolean expressions. The query is based on the AdventureWorks Sales Model. To compile and run this query, follow these steps:
Follow the procedure in How to: Execute a Query that Returns StructuralType Results.
Pass the following query as an argument to the
-- OR SELECT VALUE product FROM AdventureWorksEntities.Products AS product where product.ListPrice = @price1 OR product.ListPrice = @price2 -- || SELECT VALUE product FROM AdventureWorksEntities.Products AS product where product.ListPrice = @price1 || product.ListPrice = @price2