In SQL I can type the following:
- Code: Select all
SELECT *
FROM T1
CROSS JOIN T2
This will give me the cartesian product of the two tables. E.g.
- Code: Select all
CREATE TABLE T1 (label CHAR(1) PRIMARY KEY);
CREATE TABLE T2 (score INT PRIMARY KEY);
INSERT INTO T1 (label)
VALUES
('A'),
('B');
INSERT INTO T2 (score)
VALUES
(1),
(2),
(3);
Running the above SQL query on these tables would give a result set that contains:
- Code: Select all
label | score
-------+-------
A | 1
B | 1
A | 2
B | 2
A | 3
B | 3
How can I acheive the same result using QueryBuilder?
Thanks
Steve