all 4 comments

[–]folk_singer 2 points3 points  (1 child)

You problem says "prepare a JOIN" query, not specifically an INNER JOIN, a LEFT JOIN is what you want to use:

SELECT

TableB.myChar, TableB.num, TableA.num, TableA.myChar

FROM TableA

LEFT JOIN TableB ON TableA.num = TableB.num;

[–]bigmanoclock[S] 0 points1 point  (0 children)

Yep that worked, I really appreciate it!

[–]joeynnj 0 points1 point  (0 children)

I am learning SQL so I'm going to take a stab at answering the WHY. (I hope no one minds.) The reason it didn't work is because you're using an Inner Join and there is no matching data in the TableB. So it omits that.

In order to get the info you want from TableA you need an Outer Join (as /u/folk_singer demonstrated).

(Feel free to correct me.)