Let's say I have 2 tables, one with 3 fields (id, name, num), the other has two (id, num).
t1 :
1 | assassin | #1
1 | assassin | #2
2 | vampire | (null)
3 | zombie | #1
3 | zombie | #2
(null) | zombie | #3
4 | wizard | (null)
t2 :
1 | #1
1 | #2
2 | (null)
3 | #1
3 | #2
(null) | #3
4 | (null)
I tried to join these tables:
SELECT t2.id, t1.name, t2.num
FROM t1
INNER JOIN t2 ON t2.id = t1.id
AND t2.num = t1.num
When I execute this statement, the table shows only the records that has no null values. Why? What's the correct way to join these 2 tables? Is it proper to inner join tables on two conditions? (am using vb.net & ms access btw).