Help with easy query question

I have an SQL question that I know is easy, but I am a SQL noob.

I have this query that works;
SELECT
MailingsTemp.DATE,
CMMaster.LAST_NAME,
CMMaster.FIRST_NAME,
CMMaster.IDNUMBER

FROM [CFS].[dbo].[CMMaster]

INNER JOIN
MailingsTemp on MailingsTemp.IDNUMBER = CMMaster.IDNUMBER

I want to add a field from a third table (CMContFile) that also is keyed by the same IDNUMBER

How do I add the join for the third table?

Just add an exta INNER JOIN like so


INNER JOIN
MailingsTemp on MailingsTemp.IDNUMBER = CMMaster.IDNUMBER 
INNER JOIN
CMContFile ON CMContFile.IDNUMBER = CMMaster.IDNUMBER

Then you can add the field(s) you want to select from CMContFile to the SELECT clause of the query.
Note that you don’t have to specify in which order MySQL needs to JOIN the tables. Stating MailingsTemp first and than CMContFile doesn’t mean MySQL will join that way. MySQL will figure out the best way to join the tables for itself*.

* If you really want MySQL to join tables in a particular order --and in 99,9999% of the time there is no reason for this-- you can use the query hint STRAIGHT_JOIN

thanks a bunch!