Determines whether a value matches any value in a collection.
- Any valid expression that returns the value to match.
- [ NOT ]
- Specifies that the Boolean result of IN be negated.
- Any valid expression that returns the collection to test for a match. All expressions must be of the same type or of a common base or derived type as value.
true if the value is found in the collection; null if the value is null or the collection is null; otherwise, false. Using NOT IN negates the results of IN.
The following Entity SQL query uses the IN operator to determine whether a value matches any value in a collection. 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