title: join two tables that have keys that references the same key on a third table without using the third table
body: <p>I have a table named A that has a foreign key named id that references id on table B
  I also have a table named C that has a foreign key that references id on table B.
  I want to join table A and C and use only the common data of A and C and I don't care if B has extra data </p>
  
  <p>Can I use this :</p>
  
  <p><code>A inner join C on a.id=c.id</code></p>
  
  <p>Or I must use this :</p>
  
  <p><code>A inner join B on a.id=b.id inner join C on b.id=c.id</code></p>
  
  <p>The only reason I ask is because i read that I must use joins on foreign keys because it is safer but if I can use only 1 join istead of 2 then why not?</p>