This is down to changes that were made for new versions of ZPE.
There are two other kinds of join in SQL, left and right.
With the original Venn Diagram as pictured, the Left Join means everything in Table 1 and everything matching in Table 2.
A Right Join would mean everything matching in Table 1 and everything in Table 2.
The following tables are used in these examples:
|001||Intel Core i7 2600|
|002||Intel Core i5 2400|
|003||Intel Core i3 2120|
A Right Join which selects from both tables would look like:
SELECT `product_name`, `price` FROM `Purchases` p RIGHT JOIN `Product_Info` i ON p.`product_id` = i.`product_id`
Using the above statement will return the following table:
|Intel Core i7 2600||$270.00|
|Intel Core i7 2600||$252.00|
|Intel Core i5 2400||$120.00|
|Intel Core i5 2400||$190.00|
|Intel Core i3 2120||NULL|
Note the important NULL result that shows that although the left table has a table for 'Intel Core i3 2120', the right table has no rows that match. What this shows to the user of the SQL database is that there are no purchases for the 'Intel Core i3 2120'.
Conversley, this could work with a left join using the following statement:
SELECT `product_name`, `price` FROM `Product_Info` i LEFT JOIN `Purchases` p ON p.`product_id` = i.`product_id`
This would return the same results.
S1s and S2s really enjoyed the lesson on cybercrime using the lesson on How to Rob A Bank on… https://t.co/MxjDYE2JFu
7 months ago
S2s doing really well in hardware test! Also really enjoying doing tests electronically rather than on paper.… https://t.co/ritdfcW6Mw
7 months ago
S1 and S2 pupils listing input and output devices and giving answers such as keyboard and mouse but there were also… https://t.co/dGxDkYqFxo
8 months ago