INTERSECT

Returns a collection of any distinct values that are returned by both the query expressions on the left and right sides of the INTERSECT operand. All expressions must be of the same type or of a common base or derived type as expression.

Syntax

expression INTERSECT expression

Arguments

expression: Any valid query expression that returns a collection to compare with the collection returned from another query expression.

Return Value

A collection of the same type or of a common base or derived type as expression.

Example

(select p.ProductId, p.ProductName from Products as p where p.UnitPrice < 100 )
intersect
(select p.ProductId, p.ProductName from Products as p where p.UnitPrice > 200)

Last edited Mar 12, 2013 at 9:24 AM by ansiboy, version 1

Comments

No comments yet.