title: select fields from table where id not in another table in mysql [not working]
body: <p>I'm trying to fetch data from a table and that id is not in another table. I referenced some code example to solve this but it didn't still work. I tried two style for this. My tried sql code is as below and please help me. Thank.</p>
  
  <p><strong>Style 1</strong></p>
  
  <pre><code>SELECT *
  FROM quotation q
  WHERE q.quotationId NOT IN (SELECT ip.quotation_id FROM invest_project ip)
  </code></pre>
  
  <p><strong>Style 2</strong></p>
  
  <pre><code>SELECT *
  FROM quotation q
  LEFT JOIN invest_project ip
  ON q.quotationId = ip.quotation_id
  WHERE q.quotationId IS NULL
  </code></pre>