title: Delete multiple records from multiple tables based on child table
body: <p>I need to delete multiple table data with an unique id. </p>
  
  <p>I need to delete that table data if child table does not exist.</p>
  
  <p>I tried <code>isnull</code> and if null option but its not working:-</p>
  
  <pre><code>SELECT * FROM carbrand 
  INNER JOIN carmodel 
  INNER JOIN carversion 
  WHERE 
  (
       (carmodel.brandid = carbrand.recid) OR 
       (carmodel.brandid = '')
  ) 
  AND 
  (
       (carversion.brandid = carbrand.recid) OR 
       (carversion.brandid = '')
   ) 
   AND carbrand.recid = 17
  </code></pre>