I have a table of people
I have a table of items
I have a table of inventory (this table tells which person has how many of each product, but does not have a record if the person has "0")
people.name
--------------
jay
mark
lisa
products.item
---------------
item1
item2
item3
item4
inventory.person,item,qty (again, this table does not have a row if the person has 0 balance)
-----------------------------
jay - item1 - 2
jay - item2 - 1
mark - item3 - 1
mark - item1 - 1
lisa item3 - 3
I need a query that will give me a dataset that lists all the items from the item table, and all the people from people table, regardless of whether they have the item or not - just showing a "0" for the balance, thus:
jay - item1 - 2
jay - item2 - 1
jay - item3 - 0
jay - item4 - 0
mark - item1 - 1
mark - item2 - 0
mark - item3 - 1
mark - item4 - 0
lisa item1 - 0
lisa item2 - 0
lisa item3 - 3
lisa item4 - 0
I can't think of the type of join this would be, i'm only familiar with inner/right joins, and outer/left joins... thank you!!