title: Using inner join on two tables with foreign key that references primary id on main table
body: <p>Lets say I have the following tables:</p>
  
  <p>BrandsTable</p>
  
  <pre><code>+-----------+--------------+------+-----+---------+-------+
  | Field     | Type         | Null | Key | Default | Extra |
  +-----------+--------------+------+-----+---------+-------+
  | ID        | varchar(20)  | NO   | PRI | NULL    |       |
  | CarBrand  | varchar(100) | NO   |     | NULL    |       |
  | FuelType  | varchar(100) | NO   |     | NULL    |       |
  +-----------+--------------+------+-----+---------+-------+
  </code></pre>
  
  <p>ModelsTable  </p>
  
  <pre><code>+------------+--------------+------+-----+---------+-------+
  | Field      | Type         | Null | Key | Default | Extra |
  +------------+--------------+------+-----+---------+-------+
  | ID         | int(2)       | NO   |     | NULL    |       |
  | Model      | varchar(100) | NO   |     | NULL    |       |
  | BrandID    | varchar(100) | NO   | MUL | NULL    |       |
  | TopSpeed   | varchar(100) | NO   |     | NULL    |       |
  +------------+--------------+------+-----+---------+-------+
  </code></pre>
  
  <p>Here are some entries</p>
  
  <pre><code>+----+----------------+-------------------------+
  | ID | CarBrand       | FuelType                |
  +----+----------------+-------------------------+
  | 0  | Ford           | Gasoline                |
  | 1  | Chevy          | Gasoline                |
  | 2  | Peterbilt      | Diesel                  |
  | 3  | GMC            | Gasoline                |
  | 4  | OshKosh        | Natural Gas             |
  +----+----------------+-------------------------+
  
  +----+---------------+---------+------------+
  | ID | Model         | BrandID | TopSpeed   |
  +----+---------------+---------+------------+
  |  1 | F150          | 0       | 130MPH     |
  |  2 | 1500          | 1       | 110MPH     |
  |  3 | 389           | 2       | 70MPH      |
  |  4 | 1500          | 3       | 110MPH     |
  |  5 | Mustang       | 0       | 170MPH     |
  |  6 | Cement Truck  | 4       | 65MPH      |
  +----+---------------+---------+------------+
  </code></pre>
  
  <p>BrandID column in the Models table is the foreign key to the Brand table’s primary key, the ID column. What if you <strong>do not have access</strong> to the values of either of the columns. How would I write an SQL Query that will list all the Models that belong to Ford using INNER JOIN</p>