Consider the following two tables, with 3 columns each:
Table 1:
a INTEGER NOT NULL,
b INTEGER NOT NULL,
c INTEGER NOT NULL
Table 2:
d INTEGER NOT NULL,
e INTEGER,
f INTEGER NOT NULL
I'm trying to write a query expression that joins the two tables on a 2 part, composite key: (b, c) = (e, f)
.
I know that if column e
was not Nullable
I could just write:
query {
for r1 in c.table1 do
join r2 in c.table2 on ((r1.b, r1.c) = (r2.e, r2.f))
.
.
}
But how do I do it if column e
is Nullable
but column b
in not?