title: How to do this query in MySQL which one should I use using left join or right join or inner join?
body: <pre><code>table book:
  BookCode| AuthorShortN  |Title
  ============================================
  101 | Anton B   | THe Book of Leaves
  102 | JJ. Abram | Wish Upon A Star
  103 | Anonymous | Secret of Universe
  104 | Anton B   | The Sentinel
  
  
  table author:
  AuthorID|AuthorFullName   |Nationality
  =====================================
  A01 | Anton Balwin    | USA
  J02 | Johannes J Abram| UK
  
  
  table bookauthor:
  BookCode|AuthorID
  =================
  101 | A01
  102 | J02
  103 | X01
  104 | A01
  </code></pre>
  
  <p>I have three table with the structure look like this. And I would like to have a query such that the result will be: </p>
  
  <p>if I do this query</p>
  
  <pre><code>select * 
  from book tb , author ta, bookauthor tba 
  where tb.BookCode = tba.BookCode and tba.AuthorID = ta.AuthorID
  </code></pre>
  
  <p>It will not show <code>row 103   | Anonymous | Secret of Universe</code> as the Author is not in the table author. </p>
  
  <p>and what I want is:</p>
  
  <pre><code>BookCode| Title         | AuthorID | AuthorShortN
  ===========================================================
  101     | THe Book of Leaves|A01       | Anton Balwin    
  102     | Wish Upon A Star  |J02       | Johannes J Abram
  103     | Secret of Universe|NULL      | Anonymous
  104     | The Sentinel  |A01       | Anton Balwin
  </code></pre>
  
  <p>how to fix the query to produce such result ? </p>
  
  <p>Thanks very much for the help.</p>