Table of Contents

About

intersect (or intersection) is a relational operator that returns the intersection of two relation A and B, denoted by A ∩ B.

An intersection is defined as all tuples (rows) that are present in both of two union-compatible (same columns and same type) relation A and B.

The following definition are also equivalent.

  • all elements of A that also belong to B
  • all elements of B that also belong to A

Visualisation

Venn Diagram

Syntax

Minus

A derived operator using minus (-) where the minus expression <math>( R1 - R2 )</math> returns anything that is only in R1

<MATH>\Large R1 \cap R2 = R1 - ( R1 - R2 ) </MATH>

Join

  • Derived using join

<MATH> \Large R1 \cap R2 = R1 \times R2 </MATH>

Documentation / Reference