The training used five tables A, B, C , D and E, each with a single int column.
Table A has column a with values 1, 2, 3, 4, 5 Table B has column b with values 1, 2, 3, 4 Table C has column c with values 1, 2, 3, 4, 5, 6 Table D has column d with values 1, 2, 3, 4 Table E has column e with values 1, 2, 3
When running the following SQL...
select * from E left join C on e = c right join B on e = b;
we got the following results:
+------+------+------+ | e | c | b | +------+------+------+ | 1 | 1 | 1 | | 2 | NULL | 1 | | 3 | NULL | 1 | | 1 | NULL | 2 | | 2 | 2 | 2 | | 3 | NULL | 2 | | 1 | NULL | 3 | | 2 | NULL | 3 | | 3 | 3 | 3 | | 1 | NULL | 4 | | 2 | NULL | 4 | | 3 | NULL | 4 | +------+------+------+ 12 rows in set (0.00 sec)
Common sense expects the number of rows returned to be four. So where's the Cartesian coming from?
- ian
-- | Ian Sales Broadband Solutions for | | Database Administrator Home & Business | | PlusNet plc http://www.plus.net | + ----------- PlusNet - The Smarter Way to Internet ----------------+
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]