Say I have two tables, Table1 and Table2. Table1 has a primary key field "ID", and Table2 has a foreign key of "ID". Table1 has a one-to-many relationship with Table2, ie. there is only one entry for an ID in Table1, but there are many entries in Table2 that have that ID.
If I want to join Table1 with Table2 where Table1.ID = Table2.ID, what does the result look like?
I'm using SQL Server2000 if that makes a difference.
jupiter ... (i'm too tired to list them all, i think there's 61 of them)
note that the rows with NULL for table2.id are only seen in a left outer join
i just thought i'd mention that, because there are several different kinds of join
One more question. If I want to join (inner) three tables instead of two, and the third table is related to the first in the same way as the second table, what kind of output does that generate, and how do you construct that join statement?
Inhabitant (for our example, lets pretend there are aliens)
I guess I "won't do that then", although it would be nice. If we were somehow able to relate Table_Moon and Table_Inhabitants, would it then be feasible? Join moon and inhabitants and then join the result to planet?