Relation:intersection

Uses the two relations top of the stack and creates a new relations that containt the tuple in both relations. The tuples must have the same columns.

Description

intersection

Parameters

None.

Examples

Using the sample relation films.csv

read "films.csv"
dup
select director == "Godard"
swap
select year < 1966
intersection

film director year
Pierrot le fou Godard 1965
A bout de souffle Godard 1960

Comments

Tuples in both relations must have the same columns, but not necessarily in the same order, because the order of the columns does not matter.

See also

union, difference