Om du anger dina tabeller utan någon JOIN ON
sats eller likheter/villkor i WHERE
klausul får du den katesiska produkten du letar efter.
SELECT table1.field1, table2.field2
FROM table1, table2
kommer att ge dig vad du ber om. Visar det mer explicit...
SELECT * FROM table1;
+--------+
| field1 |
+--------+
| 1 |
| 2 |
+--------+
SELECT * FROM table2;
+--------+
| field2 |
+--------+
| 3 |
| 4 |
+--------+
SELECT table1.field1, table2.field2 FROM table1, table2;
+--------+--------+
| field1 | field2 |
+--------+--------+
| 1 | 3 |
| 2 | 3 |
| 1 | 4 |
| 2 | 4 |
+--------+--------+