SQL - Structured Query Language

Intersect Operator



Intersect operator is returns any distinct values that are returned by both the query on the left and right sides of the INTERSECT operand. The number and the order of the columns must be the same in all UNION queries and then data types must be compatible. UNION operator does not ignore duplicate records. The following INTERSECT query is used to combine Sales Year 01 and 02 records.

-- Example 42 --

 

SELECT * FROM Sales_Year_01

INTERSECT

SELECT * FROM Sales_Year_02


Query Output Screen



* * * * *


Email Your Comment To AUTHOR